Wrong Site Title and impossible to change it

#9061
  • Resolved Christophe Ba
    Rank Math free

    Hello,
    I am very happy with this tool which is very useful to me but I noticed today that the title of my homepage is wrong.
    Indeed, all my settings seems correct because everything is fine article and page side but as regards the homepage … it does not go. I try to make all the changes in the settings but nothing changes my title correctly.

    The current title: PAGE NOT FOUND – We Love Paris – Christophe’s Parisian Addresses
    Desired title: We Love Paris – Christophe’s Parisian Addresses

    Could you give me some advice to change the title of my homepage?

    For informations :
    My EXTRA ELEGANT theme for WordPress
    My homepage is created in a Category Builder
    My website: http://www.welove-paris.com

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    Please add the following code to your theme’s functions.php file to fix this issue:

    /**
    * Only load if Rank Math plugin is activated
    */
    if ( defined('RANK_MATH_FILE' ) && 'layout' === get_option('show_on_front') ) {
    
    /**
    * Adjusting homepage’s title tag
    * @return string
    */
    function extra_rank_math_homepage_title_adjustment( $title ) {
    if ( is_home() ) {
    $title = RankMath\Helper::replace_vars( RankMath\Helper::get_settings('titles.homepage_title') );
    }
    return $title;
    }
    add_filter('rank_math/frontend/title', 'extra_rank_math_homepage_title_adjustment', 16 );
    
    /**
    * Adjusting homepage’s meta description
    * @return string
    */
    add_filter( 'rank_math/frontend/description', function( $description ) {
    if ( is_home() ) {
    $description = RankMath\Helper::replace_vars( RankMath\Helper::get_settings( 'titles.homepage_description' ) );
    }
    return $description;
    });
    
    /**
    * Adjusting homepage’s robots
    * @return string
    */
    add_filter( 'rank_math/frontend/robots', function( $robots ) {
    if ( is_home() ) {
    $robots = RankMath\Helper::get_settings( 'titles.homepage_robots' );
    if ( ! is_array( $robots ) || ! in_array( 'noindex', $robots ) ) {
    $robots['index'] = 'index';
    }
    if ( ! is_array( $robots ) || ! in_array('nofollow', $robots ) ) {
    $robots['follow'] = 'follow';
    }
    }
    return $robots;
    });
    }

    I hope this info helps. Thank you.

    ​​​​​​​

    Thank you so much !!
    It’s correct !
    Wonderfull

    SO happy to use this plugin

    Thanks

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/?rate=5#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘Wrong Site Title and impossible to change it’ is closed to new replies.