Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove “archive” from main forum title


  • Sascha
    Participant

    @kleinsascha

    Hello,

    how can I remove that annoying “archive:” tag before the Forum Title

    In my case, the main forum calls “Forum” and when I visit the startpage, the title is: “Archive: Forum”

    See screenshot: https://ibb.co/fNw0FSN

Viewing 9 replies - 1 through 9 (of 9 total)

  • Robin W
    Moderator

    @robin-w

    This is theme related, but if you can give me a link to a live example, I might be able to give you some code


    Sascha
    Participant

    @kleinsascha

    Hello,

    that is nice, thanks for your answer.

    The Link is: https://www.wordpress-star.de/?cmp_bypass=f9972b4d5956df4904f1958718031e36 and then “forum” in the menu.

    Currently only Bypass-Link is possible, due to the fact that the site is not online.


    Robin W
    Moderator

    @robin-w

    ok, I can not help unless I can see an example – iIneed to look at what is downloaded to my PC’s browser


    Sascha
    Participant

    @kleinsascha

    Yes and I posted you a link where you can see it … ?
    Click on the link and then in the menu on the link “Forum”


    Sascha
    Participant

    @kleinsascha


    Robin W
    Moderator

    @robin-w

    I took a look, it is theme related, but I cannot offer a fix.


    Sascha
    Participant

    @kleinsascha

    Ok, thank you anyway.
    Then I have to ask in other forum.


    Sascha
    Participant

    @kleinsascha

    Found solutions in an other forum, just to add in the functions.php:

    add_filter( 'get_the_archive_title', function ($title) {
    if ( is_category() ) {
        $title = single_cat_title( '', false );
    } elseif ( is_tag() ) {
        $title = single_tag_title( '', false );
    } elseif ( is_author() ) {
        $title = '<span class="vcard">' . get_the_author() . '</span>' ;
    } elseif ( is_tax() ) { //for custom post types
        $title = sprintf( __( '%1$s' ), single_term_title( '', false ) );
    } elseif (is_post_type_archive()) {
        $title = post_type_archive_title( '', false );
    }
    return $title;
    });

    Robin W
    Moderator

    @robin-w

    thanks for posting 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar