[Resolved] 'Archives' at the bottom of articles

Home Forums Support [Resolved] 'Archives' at the bottom of articles

Home Forums Support 'Archives' at the bottom of articles

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1175974
    Victor

    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

    #1176544
    Leo
    Staff
    Customer Support

    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 πŸ™‚

    #1176636
    Victor

    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’ );
    } );

    #1176799
    Tom
    Lead Developer
    Lead Developer

    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 πŸ™‚

    #1183732
    Victor

    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.

    #1184179
    Tom
    Lead Developer
    Lead Developer

    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' );
    } );
    #1184300
    Victor

    Works like a charm!

    Thanks Tom!

    #1184944
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

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