Site logo

Archived topic

Thumbnails in prev/next navigation do not stay within category

3 replies · Started by Callista on April 14, 2019

Viewing posts 1–4 of 4

Hi Leo, Tom, and all,
So this code is working great if I don't want to just navigate within a category. If I turn that on (ie, change row 25 from "false" to "true": $category_specific = apply_filters( 'generate_category_post_navigation', true );), the navigation titles and links are fine but the thumbnails do not match. They seem to be the next and previous thumbnails of posts in general, and are not staying within the category. I do not know enough php to troubleshoot this myself...
Thanks so much.
Have a great day!
Best,
Callista

Yay! That works!! Thanks so much!
(Please note that the second instance of $prevPost = get_previous_post(true); should actually be $nextPost = get_next_post(true); - see my comment here.)
Have a great day!
Best,
Callista

Glad to be of help. Yes i thought that was peculiar to have two previous_posts but i didn't read all the post as to what it was doing lol :)

This archived topic is closed to new replies.