Site logo

[Support request] How to display category title and description on the root page only?

Home Forums Support [Support request] How to display category title and description on the root page only?

Home Forums Support How to display category title and description on the root page only?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2600800
    vincenteccl

    Hi! I want to display the category page title and description ONLY on the first page of the archive, but not paginated pages 2,3,4 etc.
    Right now, the archive title and description are on every page.
    How to change that?
    Thanks.

    #2601059
    David
    Staff
    Customer Support

    Hi there,

    try adding this PHP Snippet to your site:

    add_action( 'wp', function() {
        if ( is_paged() ) {
            remove_action( 'generate_after_archive_title', 'generate_do_archive_description' );
        }
    } );

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

    #2601119
    vincenteccl

    Thanks. It works!!

    #2601856
    David
    Staff
    Customer Support

    Glad to hear that!

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