- This topic has 9 replies, 4 voices, and was last updated 1 year, 7 months ago by
Tom.
-
AuthorPosts
-
November 11, 2020 at 10:49 pm #1527740
Yael
Hello,
I read the other threads in the forum and added the appropriate code snippet to my child theme’s function.php file
add_filter( 'generate_category_post_navigation', '__return_true' );
However, the post navigation is not limited to category as you can see here:
https://aviadrealty.com/gc-free-standing/
Is there something else I need to do in order to limit post navigation to category?
November 11, 2020 at 11:24 pm #1527766Elvin
StaffCustomer SupportHi,
However, the post navigation is not limited to category as you can see here:
Strange.
Adding this snippet as it is should work without any issues.
Any chance you could provide use temporary site access so we could check any implementation issues?
You can provide the site details on the Private Information text field. Thank you.
A wise man once said:
"Have you cleared your cache?"November 11, 2020 at 11:31 pm #1527769Yael
Sure, posted below.
November 12, 2020 at 6:32 am #1528165David
StaffCustomer SupportHi there,
i checked one Category and looked at this post:
/gc-free-standing
and next and previous posts were correct and from the same category.Is there a particular post category that its not working ?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 12, 2020 at 6:36 am #1528170Yael
Can you share a screenshot b/c on that particular post, I’m still seeing post navigation include posts from all categories?
November 12, 2020 at 6:42 am #1528178Yael
Okay, just dawned on me, perhaps that shortcode only applies to main categories and not sub categories.
This website has two main categories with lots of sub categories; I want to limit post navigation to posts within the sub categories, not the main category.
For example:
Jerusalem Rentals is the main category but has dozens of sub categories. I want to limit post navigation to the the sub category each post is in…. b/c each sub category is a specific area in Jerusalem
So for the listing you mentioned, it is in German Colony Rentals (a sub category of Jerusalem Rentals).
November 12, 2020 at 7:12 pm #1529160Tom
Lead DeveloperLead DeveloperHi there,
I’ve just done some looking around for this and I couldn’t find an easy-to-implement solution, unfortunately.
Using the filter above, is it working for child categories as well as the parent category? So in theory, we just need to exclude the parent category?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentNovember 12, 2020 at 8:57 pm #1529231Yael
Hi Tom. NO need to exclude the parent category.
Apparently I’m still not seeing what you all are seeing even though I’ve cleared my cache multiple times.
I still post navigation from other sub categories rather than, for example on the post viewed above, only from the German Colony.
https://aviadrealty.com/gc-free-standing/
The listing is under Jerusalem Rentals > German Colony but the before and after posts are from City Center and Abu Tor (two different sub categories).
So you are seeing before and after listings only within German Colony?
November 13, 2020 at 5:49 am #1529667Yael
OH, wait, my correction. yes we would need to exclude the parent category as it’s what is pulling in the posts from all the sub categories 🙂
November 13, 2020 at 9:03 am #1530157Tom
Lead DeveloperLead DeveloperI’ve been digging some more but I can’t find any solid example, unfortunately.
The only thing I found is someone saying they only added the child category to their posts (left the parent category un-checked) and that worked for them. Not sure if that’s something that will work in your case?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.