Home page title showing Page Not Found

#9424
Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

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

    The Extra theme that you are running makes use of a category layout instead of a standard page. Rank Math is unable to load the data from this layout but you can fix this by adding the following code to your functions.php file:

    /**
    * 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.

    ​​​​​​​

    Hello, i just did it and its not working. http://www.arundelpost.com

    Hi Arundel,

    Thanks for the follow up.

    Can you confirm that you have added this code to your theme’s functions.php file before the closing ?> if it exists? If so, please edit the first post on this ticket and include your WP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Added it

    Hi there,

    The login details on the sensitive data section are not complete.

    Please generate an access token using the plugin we recommended above.

    We are looking forward to helping you. Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘Home page title showing Page Not Found’ is closed to new replies.