Site logo

[Resolved] Remove category title and description

Home Forums Support [Resolved] Remove category title and description

Home Forums Support Remove category title and description

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2601557
    Alex

    Hi,

    I’d like to use a Hook for Category archive title and description and I’d need to disable the main ones. Is this possible?

    #2601562
    Ying
    Staff
    Customer Support

    Hi Alex,

    If you are using a block element – page hero for the title and description, then there’s a built-in option to disable the default title in the element itself:

    https://docs.generatepress.com/article/block-element-page-hero/#disable-title

    #2601599
    Alex

    Hi Ying,

    I’m using a Hook because when I use a Header, I get the block behind the query on the cat archive page. (image URL in private)

    #2601874
    David
    Staff
    Customer Support

    Hi there,

    you can add this PHP Snippet to remove the archive title and description:

    
    add_action( 'wp', 'lh_remove_archive_title' );
    function lh_remove_archive_title() {
            remove_action( 'generate_archive_title', 'generate_archive_title' );
    } 

    How to add PHP: https://docs.generatepress.com/article/adding-php/

    #2601992
    Alex

    Thank you David

    #2603780
    David
    Staff
    Customer Support

    You’re welcome

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