Hi,
Using php function and template files, I’ve created a full width header for my categories pages.
However, the title/description is now displayed 2 times in the page : in the header and in #content. I want to my title / description to be displayed only in the full width header.
Using this function works but it removes the title/description everywhere :
add_action( 'wp', function() {
if ( is_category() ) {
remove_action( 'generate_archive_title', 'generate_archive_title' );
}
if ( is_category() ) {
add_action( 'generate_after_main_content', 'generate_do_archive_description' );
}
} );
What should I do ? Stop using <?php do_action('generate_archive_title'); ?>
in my header template ?
Thanks