Archived topic
Latest Posts block displaying all posts on pagination (previous and next)
6 replies · Started by Giselle on September 25, 2020
Hi,
The latest Posts block in GenerateBlocks is showing only Pots from the category I've specified on the page I've added it to, but when I go to a single post Page the Display post navigation is showing Posts from all categories: eg. News (bottom of Home page) is showing Posts from Research and Campaigns (and others).
Thanks so much for your help.
Giselle
Hi there,
you can restrict the Post Navigation to the current category by adding this PHP Snippet:
add_filter( 'generate_category_post_navigation', '__return_true' );
Hi David,
Thank you!
I'm not using a child theme as most of my changes are just CSS. Do I just use the Code Snippets plugin to add the function - mentioned on your link above? Or is it better to create a child theme and add it to the functions file?
Thanks for your help!
(PS: You previously suggested using GenerateBlocks and this plugin has pretty much revolutionized my workflow! My client is very happy with the boxes, and I'm finding it easy to teach them to edit them too.)
Yes the code snippets plugin is the best way to go :)
Really glad to hear you and your clients are enjoying GB - really nice to get his kind of feedback!
Thanks, David :-)
resolved.
Glad to hear that