[Resolved] Latest Posts block displaying all posts on pagination (previous and next)

Home Forums Support [Resolved] Latest Posts block displaying all posts on pagination (previous and next)

Home Forums Support Latest Posts block displaying all posts on pagination (previous and next)

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1458203
    Giselle

    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

    #1458231
    David
    Staff
    Customer Support

    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' );

    https://docs.generatepress.com/article/adding-php/

    #1458248
    Giselle

    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.)

    #1458340
    David
    Staff
    Customer Support

    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!

    #1458745
    Giselle

    Thanks, David ๐Ÿ™‚

    #1458746
    Giselle

    resolved.

    #1459109
    David
    Staff
    Customer Support

    Glad to hear that

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.