Schema Markup Code and Help

#12444
  • Resolved Andrea Finkelstein
    Rank Math free

    Hi. We are trying to add additional schema markup to our website beyond what is offered in RankMath or others. I posted to the RankMath FB page and you suggested I open a support ticket. Here is the original Facebook post, as well as our desired changes below that….

    Andrea Finkelstein
    Conversation Starter · 18 hrs · tag Question
    Hi everyone! Since my last post/question, we went a little different schema route than I thought. We were going to use a different plug in for schema and rich snippets and turn off Rank Math for those portions. But, they also left a lot to be desired. So, now we have a programmer adding json schema coding to improve productontology, product catalog, service area, and more. We would like to still use Rank Math for the basics and then add lines within it (ie you might have our service area in Phoenix, but we want to define it as metro Phoenix by directing Google to what we mean by Phoenix. But, I can’t seem to find where you are placing your schema for these items. It isn’t in the header.php file, as I had expected. Can you please enlighten us? Has anyone else following these posts done something similar? Thank you!
    11
    8 Comments
    Like
    Comment
    Comments
    Rank Math
    Rank Math Hello Andrea Finkelstein
    Are you planning to extend the Schema Markup functionality of Rank Math? If so, then you need to use the filters which go into theme’s functions.php file
    https://rankmath.com/kb/filters-hooks-api-developer/
    If you can tell us more about the fields are you are looking to add to a particular Schema type, we can provide you with the code.
    Or are you looking to add those fields only to the homepage?
    Looking forward to helping you. Thank you.
    Hide or report this
    Rank Math SEO Filters and Hooks for Developers – Rank Math
    RANKMATH.COM
    Rank Math SEO Filters and Hooks for Developers – Rank Math
    Rank Math SEO Filters and Hooks for Developers – Rank Math
    1
    Love
    · Reply · 18h
    Andrea Finkelstein

    Here is our ‘wish list’ so to speak….
    Specifically, Schema.org only offers either professional service or service, and doesn’t drill down for our industry (cleaning). In addition, there are many types of cleaning companies and services, some we do, some we don’t offer, such as carpet cleaning. We are going to add the definitions for residential cleaning and commercial cleaning into our schema to help Google better understand exactly what we do, and help target to those two areas beyond what our content and rich snippets already provide, or at least this will strengthen them even further. I don’t have a sample of the schema syntax for this, but I can find it if you need.

    In addition, we will be making a product catalog in schema, to again further target these areas.
    Here is a sample of the catalog from a website. It is not ours specifically.
    “@type”: “OfferCatalog”,
    “name”: “House Cleaning”,
    “itemListElement”: [
    {
    “@type”: “Offer”,
    “itemOffered”: {
    “@type”: “Service”,
    “name”: “Apartment light cleaning”
    }
    },
    {
    “@type”: “Offer”,
    “itemOffered”: {
    “@type”: “Service”,
    “name”: “House light cleaning up to 2 bedrooms”
    }
    },

    Another area we will be adding schema info to is “areas served.” Google thinks that, because we are in the ‘suburb’ of Scottsdale, we primarily service Scottsdale. We already have quite a bit of SEO on page. But, we are going to do two things in schema here, too. We want area served to be Phoenix, with a supporting schema reference to the definition of Metropolitan Phoenix. Then, we’d also like to add ‘other areas served’ to add all of the other ‘suburbs’ of metro Phoenix.

    Next, our plan is to also add our Thumbtack presence and HomeAdvisor presence to ‘same as’ schema, as you are offering Facebook, Twitter, and similar, but not these. We have a strong presence on these and other ranking sites.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting Rank Math today.

    This sounds very interesting, I am not quite sure I have understood the kind of help you need from our end. All these requirements can be achieved by adding custom schema markup within this filter:

    /**
     * Collect data to output in JSON-LD.
     *
     * @param array  $unsigned An array of data to output in json-ld.
     * @param JsonLD $unsigned JsonLD instance.
     */
    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
    	return [];
    }, 10, 2);

    Your custom schema markup will then be integrated in the json-ld data that is already available on the page from Rank Math.
    The schema data can be found on the < head > section as shown below:
    IMG

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hi! I’ve been trying in vain to find a freelancer who understands json and is also familiar with RankMath to help me with some of the additions I spoke with above. I know support offered to actually help me with getting this done. I was hoping to find a reasonably priced ‘expert’ that I can use not only for my 4 websites, but also on future sites, as I’m also a domain and hosting reseller for GoDaddy, and I’m hoping to do a bit of SEO consulting down the road. Can you help me implement the ‘hook’ and maybe get me started on adding a few of the json items that aren’t currently ‘asked’ by RankMath? And, can you also recommend someone I can work with to do this in the future?

    Thank you so much for all the continuing help and support you give to implementing the best seo strategies via your plug-in.

    All the best,
    Andrea

    Hi Andrea,

    Thanks for getting back to us.

    Since this is a public forum, please send an email to s******@r*********** to chat with our development team who will also advise on the way forward.

    Feel free to create a new ticket for any other questions, comments or suggestions.

    Thank you.

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

The ticket ‘Schema Markup Code and Help’ is closed to new replies.