• Hello Generatepress team!! I am strugling to remove the “Sitelinks search box” schema markup from all pages and posts except homepage.
    Currently generatepress shows the schema markup on all pages and posts which google is not recommending. Google recommend the sitelinks schema only on the homepage.

    Plz help me to remove the “sitelinks search box” schema from all pages and posts except homepage.
    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi there,

    GeneratePress doesn’t add that kind of schema. I would assume you’re using an SEO plugin that does.

    Thread Starter Muhammad shafiq

    (@muhammadshafiq)

    Hi David! Thanks for the response. But i have deactivated seo plugin and still every post and page is showing “site nagivation” schema.

    See this documentation on how to remove the themes schema markup:

    https://docs.generatepress.com/article/generate_schema_type/

    Thread Starter Muhammad shafiq

    (@muhammadshafiq)

    I am using the code snippet plugin to add PHP code. The issue is that the code applies globally. I don’t want to remove the schema markup from the homepage. I want to remove the theme default schema from the whole website except the homepage.

    Hi there,

    Can you try this?

    add_filter( 'generate_schema_type', function($microdata){
    if(is_front_page()){
    return false;
    } else {
    return $microdata;
    }
    } ,10 ,1 );
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove “Sitelinks Search Box” schema’ is closed to new replies.