• Resolved totalgeeks

    (@totalgeeks)


    Hey guys,

    Any idea if there’s a way to change the default scheme type to something more appropriate? The current 4 options aren’t useful in my case – any chance there’s a filter or something I can hook into to change it?

    Cheers,

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor dudo

    (@dudo)

    Hi!

    Yes, you can use this filter:

    $filtered_schema = apply_filters( ‘yasr_filter_schema_jsonld’, $review_choosen );

    Best,
    Dario

    • This reply was modified 7 years, 3 months ago by dudo.
    Thread Starter totalgeeks

    (@totalgeeks)

    That’s great!

    Sorry but this is probably a bit dense… how would I use that to change the schema type? Do I need to use it in a function somehow?

    Plugin Contributor dudo

    (@dudo)

    You should use that filter to create your, something like

    my_function () {
    
    $schema["@context"] = "http://schema.org/";
    $schema["@type"] = "Person";
    $schema["name"] = "dario";
    $schema["alternateName"] = "dudo";
    $schema["url"] = "dariocurvino.it";
    $schema["image"] = "";
    $schema["sameAs"] = "https://www.linkedin.com/in/dario-curvino/";
    
     return json_encode($schema);
    
    }
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Default Schema Type’ is closed to new replies.