My requirement is exactly similar to Tabbed Post.
I have Advanced Custom Fields (ACF) plugin to store data.
So pulling up the requirement from the wordpress support thread:
Movie Summary | Synopsis | Screens | Trailer | Comments | Add your Review
Movie summary is the_content(), Synopsis is the_excerpt(), Screens and Trailers are custom field values.
I want to know how I can split the content i.e. Summary, Synopsis, Screens, Trailers into Tabs which will reload the page. I do not want to change the tabs using javascript and specifically want to reload page every time.
A working example would be: Example
Thanks in advance.
You can use rewrite endpoints to achieve this.
First, register your endpoints:
So now in addition to
http://domain.com/post-name/
(or whatever your particular permalink structure is), you’ll have:You can then check for the existence of these query vars in a template action, or in the template itself, and show the appropriate content: