Site logo

Archived topic

'Archives' at the bottom of articles

7 replies · Started by Victor on February 25, 2020

Viewing posts 1–8 of 8

Hi guys, hope you're well.

There's the text 'Archives' at the bottom of every single post of this website - how can I remove that, please? It's weird and I don't get it on other websites I use your theme on.

Thanks

Hi there,

That definitely shouldn't be there.

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

Any custom functions added? or have you modified the theme core files in any ways?

Let me know :)

Hi Leo - thanks for your reply!

Found the problem: I added a code snippet to change the position of category's text (from top to bottom).

If I remove it, 'Archives' disappears but so is the category description position.

Is there any way to get rid of that text and keep the category description as it is?

The code:

add_action( 'after_setup_theme', function() {
remove_action( 'generate_archive_title', 'generate_archive_title' );
add_action( 'generate_after_main_content', 'generate_archive_title' );
} );

Hi there,

Instead of that function, try this:

remove_action( 'generate_after_archive_title', 'generate_do_archive_description' );
add_action( 'generate_after_main_content', 'generate_do_archive_description' );

Let me know :)

Hi Tom & Leo,

Sorry for my late reply. After replacing the function, the category description appears twice now - at the top & once again at the bottom, so I completely removed it.

Can you try this, instead?:

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

Works like a charm!

Thanks Tom!

You're welcome :)

This archived topic is closed to new replies.