[Support request] Content below Posts on category page

Home Forums Support Content below Posts on category page

This topic contains 38 replies, has 4 voices, and was last updated by  Sonja 1 month ago.

Viewing 15 posts - 1 through 15 (of 39 total)
  • Author
  • #1007094



    On a category page, there are teasers of the posts. Now I want content below these teasers, but only on first page and not on page 2,3,4,etc.

    How can I achieve this?


    Leo Customer Support

    Hi there,

    If I understand this correctly, you can likely achieve this with a Hook Element:

    With the filter to display it:

    And the conditional tag would be this one:

    If you search keyword is_paged in our forum to see some examples.

    Let me know if this helps 🙂



    Hmm, okay, I understand, that i can use the generate_after_main_content hook. But how can I achieve, that this would be show only on first page of a specific category page?


    Leo Customer Support

    You can use the filter as I mentioned above.

    The code should be something like this:

    add_filter( 'generate_hook_element_display', function( $display ) {
        if ( 10 === $element_id && is_paged() ) {
           $display = false;
        return $display;
    } );

    Make sure to replace 10 with the actual element ID.



    okay, that is too complicated for me. I don´t understand this. I think such thinks should be easier to do and not only available for coders.


    Leo Customer Support

    Have you tried the code above?

    The only part you need to change the element ID.

    Sometimes a little bit of code is required for specific display rules you are asking, which is why we are always available to help.



    I have create a after_main_content hook withthe display rules, that it shows only on this category archive.

    Then I have create the filter you postet and set the elemt ID of the hook.

    But the content (at the moment the word “test” shows also on page 2 of the archive.

    And also I want that the content should in a box like the other contetn on this site and have the same spacing like the other boxes.

    I have add the URL in the above post.


    David Customer Support

    Hi there,

    did you remove the hook and the filter? currently i cannot see the ‘test’ content on any of those pages. If you have, can you re-add them and let us know.



    Hi David,

    no it is still there on the URL i postet. You can see the word “test” below the pagination.


    David Customer Support

    Can you flush and disable your cache as i am not seeing the content.



    Okay, done.


    David Customer Support

    Now i can see it on page 1 only. So it seems to be working.
    I can still see the cache enabled which is making it tricky to style the element. Can you make sure all your cache plugins are disabled?



    I can see it on both pages. With different Browsers.

    I use WP-Rocket. Is it possible to deactivate the plugin and activate again without any problems? Or do i have to do soemthing special after activate ist again?


    David Customer Support

    You can flush/purge/clear ( or whatever they call it ) first then disable it, then when were done you can re-enable it.

    You may also need to flush your browser caches after disabling the plugin. Best to view the site in an Incognito/Private browser to test if its also a browser caching issue.



    OK I have deactivate it. But I see the test still on both pages.

Viewing 15 posts - 1 through 15 (of 39 total)

You must be logged in to reply to this topic.