- This topic has 5 replies, 2 voices, and was last updated 11 years, 1 month ago by Sanjip Shah.
-
AuthorPosts
-
August 4, 2013 at 2:33 am #2966lisapiecaMember
Hi –
We are using a number of different galleries (just the basic wordpress ones) on our site that mimic our ‘post categories’ and we want to restrict the previous / next post links to stay within a particular category.
I’ve found a couple of threads in other forums that indicate this is possible eg
http://codex.wordpress.org/Function_Reference/previous_post_link
http://wordpress.stackexchange.com/questions/63689/next-previous-links-doesnt-work-in-the-same-categorybut can’t find where / how I make these edits in attitude pro.
Would love it if you could point me in the right direction.
cheers
lisa
August 5, 2013 at 8:36 am #3003Sanjip ShahParticipant@lisapieca I could completely get what you are trying to do. Are you trying to hide the next/previous post link in some pages?
Could you clarify it more and provide the exact page/pages where you are trying to make the changes.August 6, 2013 at 12:40 am #3034lisapiecaMemberSorry that I wasn’t clear.
I have built a site for an artist – http://www.artplusdesign.com.au and have sorted his artwork (each work has its own post) into a number of different categories:
* conceptual art
* public art > street furniture
* public art > kinetic art
* public art > playgrounds
* public art > community artAnytime you view one of the artwork posts it gives you the option to move to the previous or next artwork at the bottom of the post by creating a link/button with the title of the post you are linking to as the text.
This is great, except that the way it decides what is next/previous is based on the date the post was created, so it jumps outside of the category. We would like to limit the next and previous links to stay within the category.
I have found information in forums where others have done this (see above) but I can’t find where in the attitude theme files that I make the edits they suggest.
cheers
lisa
August 6, 2013 at 7:06 am #3049Sanjip ShahParticipant@lisapieca The code that you should edit is inside the theme folder->library folder->structure folder->content-extensions.php The related code is inside attitude_next_previous_post_link function in line around 798. Hope this helps you and also make a child theme for this customization so that you won’t lose the changes when you update the theme. Thanks.
August 10, 2013 at 10:33 pm #3153lisapiecaMemberthanks 🙂
August 12, 2013 at 10:47 am #3172Sanjip ShahParticipant@lisapieca Welcome! 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.