[Support request] Please with adding some code to the theme

Home Forums Support [Support request] Please with adding some code to the theme

Home Forums Support Please with adding some code to the theme

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
  • #1171231


    I want to to use this plugin here

    For creating Categorie Landing Pages.

    In the explanation of the plugin it says:
    “You’ll need to do a bit of coding to get the landing page content to appear on your category archive pages. Every theme is different so I recommend you talk to your theme developer for guidance on how to add this.

    Add the following code where you would like the landing page content to appear:

    if( function_exists( ‘category_landing_page’ ) )

    So, I am not sure, where to add this on generate press. Can you please help me here?

    Thank you

    Customer Support

    Hi there,

    try this:

    1. Create a new Hook Element

    2. Add this code:

    if( function_exists( 'category_landing_page' ) )

    3. Select the before_main_content hook

    4. Check Execute PHP

    5. Set your Display Rules to Category Archives


    Hello David,

    thanks for your answer. Sadly it does not work.


    Or maybe you have another solution as this plugin? I need to design the archives like normal page with gutenberg.
    I know I could create a page called “pasta recipes” and a categorie named the same and then redirect the categorie archive to the specific page that I could fill with my content. But then I do have another issue because I cannot find a way to not just the latest posts but the real archive loop post with all posts from that category with pagination.

    Maybe you know how can I solve this? Or can I maybe create a category-archive-loop that I include on a normal page but has that archive pagination behaviour like categorie archives?

    Customer Support

    Odd – i think it may need to be inside the loop – ill do some tests.
    Alternatively we provide this method for using the WP Show Posts plugin to create your own ‘archives’


    Adding that function: https://docs.generatepress.com/article/adding-php/


    Ok thank you for your help!
    To that way you show…is it possible to use it with pagination?


    and this page https://docs.wpshowposts.com/article/use-static-pages-as-category-archives/ redirects to some chinese or asian site?

    Customer Support

    If you use the WP Show Posts Plugin to display the list – you can include Pagination on one list.

    I am not sure what you mean by the redirect ? Are you saying that link takes you elsewhere let me know.


    Where would I add this here:

    To do this, you need to add this function to your site.

    add_filter(‘request’, function( array $query_vars ) {
    if ( is_admin() ) {
    return $query_vars;

    if ( isset( $query_vars[‘category_name’] ) ) {
    $pagename = $query_vars[‘category_name’];

    $query_vars = array( ‘pagename’ => “$pagename” );

    return $query_vars;
    } );

    Customer Support

    Hi David,

    ok I added the php code and installed the WP Show Post Plugin, but I see this checkbox : Seitennavigation
    Die Seitennavigation sollte nur genutzt werden, wenn deine Beiträge das Einzige im Inhaltsbereich sind, um Probleme mit doppeltem Inhalt zu vermeiden. (its german)

    So my question is? Isnt it possible to use pagination due to the double content issue?


    And what ist that Ajax Pagination that comes with PRO? Whats the difference between Ajax and normal pagination?

    Customer Support

    Can i ask – what type of content are you wanting to add to the Archives ? And will it be consistent across the archives – can you share an example?

    There may be a better solution.

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