Site logo

Archived topic

How to enable category description on all pages archives?

3 replies · Started by Hakim Najili on June 10, 2020

Viewing posts 1–4 of 4

Hello. I have been looking for several option in support forum but cannot find any.

There is no category description in my theme. Maybe some clash with plugin as I read this GP enable automatically for category desc.

So then I try this coding which i found on documentaion.

add_action( 'wp', function() {
    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    if ( 1 !== $page ) {
        remove_action( 'generate_archive_title', 'generate_archive_title' );
        add_action( 'generate_archive_title', 'tu_custom_paged_archive_title' );
    };
}, 20 );

function tu_custom_paged_archive_title() {
    ?>
    <header class="page-header">
        <h1 class="page-title">
            <?php the_archive_title(); ?>
        </h1>
    </header>
    <?php
}

The problem is its only display on first page of category in archives. How to enable category description on all pages in archives?

Sorry I'm not very familiar with coding and I just moving from Thesis Theme 1.8.9 (the old one) and found GP have similar editing with thesis theme (like hooks and so on). Thanks in advance!

Hi there,

The category description should show on all pages category archives by default.

Any chance you can disable all plugins except GP Premium to eliminate conflicts from other plugins first?

Let me know :)

i dont want to delete the plugin as i need them..can u alter the coding above for me?

No need to delete them.

Just need to disable to test where the conflicts are coming from.

The description should show by default.

This archived topic is closed to new replies.