Remove Blog Snippet from Home Page

#50774
  • Resolved Suhas R Prasad
    Rank Math free

    Hi,

    I am using this code:
    /**
    * Filter: Remove/modify schema data.
    *
    * @param array $return Array of json-ld data.
    */
    add_filter( ‘rank_math/json_ld’, function( $data, $json ) {
    if ( is_home() && isset( $data[‘Blog’] ) ) { // Remove Blog Snippet from homepage.
    unset( $data[‘Blog’] );
    }
    return $data;
    }

    To remove the Blog snippet from homepage. I am getting the below error,

    Stack trace:
    #0 wp-includes/class-wp-hook.php(289): {closure}(Array)
    #1 wp-includes/plugin.php(249): WP_Hook->apply_filters(Array, Array)
    #2 wp-content/plugins/seo-by-rank-math/includes/traits/class-hooker.php(103): apply_filters_ref_array(‘rank_math/json_…’, Array)
    #3 wp-content/plugins/seo-by-rank-math/includes/modules/rich-snippet/class-jsonld.php(77): RankMath\RichSnippet\JsonLD->do_filter(‘json_ld’, Array, Object(RankMath\RichSnippet\JsonLD))
    #4 wp-includes/class-wp-hook.php(287): RankMath\RichSnippet\JsonLD->json_ld()
    #5 wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #6 wp-includes/plugin.php(544): WP_Hook->do_action(Array)

    Could you please help me regarding the same?

Viewing 1 replies (of 1 total)
  • Hello,

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

    We might need to take a closer look at the settings. 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,

    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 1 replies (of 1 total)

The ticket ‘Remove Blog Snippet from Home Page’ is closed to new replies.