Problems with the home page

#6143
  • Resolved Andrey
    Rank Math free

    Hello.
    After upgrading to version 1.0.25, the main <meta name = robots content = follow, noindex> page, although in the index settings. In version 1.0.23.1, there was no such problem, I was updated from it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Andrey
    Rank Math free

    Hello.
    The problem is connected with the builder of the main page of the topic EXTRA. How can I solve the problem?
    Thank.

    Andrey
    Rank Math free

    Hello.
    I used to contact EXTRA Homepage Builder. Then you gave the code to fix it. I tried to add it, but it did not work and I received noindex. I deleted the line
    && RankMath \ Helper :: get_settings (‘titles.homepage_custom_robots’)
    and added
    <meta name = robots content = index, follow>
    So it will be right?
    `/**
    * 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;
    });
    }

    Hello,

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

    The last filter should be able to work without any changes, can you please clear you page cache and check if the issue will still be reproduced?
    I can also suggest that you head over to the Rank Math metabox on the admin dashboard and check whether the noindex option has been set from the advanced tab as shown below:
    IMG

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Andrey
    Rank Math free

    Hello.
    I do not have a metabox on the main page.
    I previously addressed the metadata on the main page
    https://support.rankmath.com/ticket/structured-data-in-amp/
    Rank Math is not compatible with Extra Theme Layout, which displays the main page. In that appeal was the code that I gave above. But I did not add it. In version 1.0.23.1, description and title were not displayed on the main page, but <meta name = robots content = follow, index> was displayed. When I updated to version 1.0.25 I received <meta name = robots content = follow, noindex> In the Rank settings Math main page I tried to change the settings, but they do not work. Then I tried to add the code from the last appeal. This code displays description, title and <meta name = robots content = index, follow>
    Please consider full compatibility with the Extra (Elegant Themes) theme, of course, if possible.
    Thank.

    Hi there,

    Thanks for the follow up.

    I am glad that adding this code back to your site fixed the issue 🙂

    This is on our to do list and hopefully the compatibility will be available soon.

    I hope this info helps. Thank you.

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

The ticket ‘Problems with the home page’ is closed to new replies.