Drop down navigation by postname
-
Hello, I am fairly new to wordpress but can get a basic understanding of how most things work, however when it comes to programming new features, especially the one I’m looking for, I struggle … badly.
I am attempting to create a fan fiction archive of sorts, and on each post page I wish to include a drop down menu that will allow navigation to each posts seperate chapters (these are just other posts with the same name, wordpress appends -1 or -2 and so on to the permalink).
What I’m basically looking for is a drop down list that once clicked will take the user to that particular chapter. That list I imagine would need to be populated with a list of all the other pages named with the same name (slugs will obviously be different).
The way I am organising the fan fictions is a category for each one, and with post tags I am denoting an episode, such as 1×01, 1×02 and so on that people can include to tag their post as being an episode.
From there as above if they wish to use multiple chapters they just type the exact same name (of the episode) for the post title and it would add the respective number on the end.
What I am essentially asking for is hack that counts the number of pages with the same title, and adds them to the dropdown with the text of chapter 1, chapter 2 and so on, selecting say for example chapter 4 would take the user to the 4th post of the same name.
Here is how I am using my permalinks to order it all.
/sg-rtnanc/1×01/meh-4/
or
/category/tag/postnameIf anyone could help me with this that would be fantastic!
- The topic ‘Drop down navigation by postname’ is closed to new replies.