The scheme type doesnt change

#226008
  • Resolved Romeo Belkahla
    Rank Math free

    Hello,

    I have updated my page scheme type from article to service, but when I check the HTML it says:

    <meta property=”og:type” content=”article” />

    Somehow it doesn’t change to <meta property=”og:type” content=”service” />

Viewing 15 replies - 1 through 15 (of 16 total)
  • It’s for the website: view-source:https://deslotenlijn.nl/slotenmaker-deventer/

    Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    I’ve checked the page you have provided, and it seems that you don’t have any schema in your page’s source code. Could you please check if you have the Schema Module enabled in Rank Math > Dashboard?
    Schema Module

    However, you can use the following filter to update the og:type on that specific page:

     * Allows theme developers to change the OpenGraph type of the page.
     *
     * @param string $type The OpenGraph type string.
     */
    add_filter( 'rank_math/opengraph/type', function( $type ) {
     if(is_page('page_id_here')){
         return "service";
     }
    	return $type;
    });

    And here’s a link to how to use a filter on your site:
    https://rankmath.com/kb/filters-hooks-api-developer/#adding-filters-and-hooks-in-rank-math-php

    I hope that helps.

    Thank you.

    Hello,

    I am so sorry, I had all my html compressed and minified. You can see my html clearly now.

    I always had Articles on for pages, I changed it to Service, now it still says at mentioned above:

    <meta property=”og:type” content=”article” />

    From what I think it has to be after the change: <meta property=”og:type” content=”service” />

    But this is not the case, I hope you can check now.

    Prabhat
    Rank Math agency

    Hello,

    I checked the page’s source but the schema is still not present on the page. Please have a look at this screenshot for a quick reference: https://i.rankmath.com/9Qvjzs

    However, upon checking the source of your homepage, I was able to find the schema section. Here’s a screenshot: https://i.rankmath.com/wcOVc3

    Could you please double-check if the schema is added to the post?

    Regarding the og:type, you can use the filter code provided by my colleague to change the og:type as per the requirement.

    Looking forward to hearing back from you.

    Thank you.

    Hey man,

    I checked the page and it doesn’t has a schema.org line….

    Only the homepage?

    Do you know why this is the case?

    Prabhat
    Rank Math agency

    Hello,

    Please edit the page and see if the schema is added from the schema generator? If not, then please add the required schema and see if it shows on the page’s source.

    In any case, please update the page and check the page’s source to see if the schema is displayed.

    Please let us know how that goes.

    Thank you.

    Hello

    How do i add the schema to my other pages? I have the option Schema markup enabled.

    Prabhat
    Rank Math agency

    Hello,

    You can add the schema to the individual posts/pages from the schema generator present inside the schema tab of Rank Math’s SEO Meta Box.

    Please have a look at this screencast for a quick reference: https://i.rankmath.com/3jFIQp

    For more details, please refer to this tutorial guide:
    https://rankmath.com/kb/rich-snippets/#adding-schema-on-posts-and-pages

    Hope that helps.

    Thank you.

    Hi,

    It is on, i have uploaded a picture:

    https://ibb.co/7K1L5bz

    Hi again,

    I did a test with Yoast SEO, and there it worked perfectly for all pages.

    So i think there is really a problem with RankMath, I have shared my login details of WP so u cN check.

    Ankit
    Rank Math business

    Hello,

    Its more like cache issue on your website, Sometimes I am able to see the schema on your website sometimes not, You can try to clear your web browser cache and also clear SG cache from the WordPress dashboard. The schema is appearing inside your page source code.

    See the screenshot for your reference:
    https://i.rankmath.com/gl6gEZ

    And, In order to change og:type” content=”article” to og:type” content=”service” You would need to put that code provided here into your current theme’s function.php file.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hi,

    The code breaks my website, it’s definitely an issue with RankMath in combination with Divi.

    I compressed the HTML for visitors so that’s why I sent my login details, if you are logged in you can see the HTML in a good way.

    Please check for me.

    Ankit
    Rank Math business

    Hello,

    I can’t able to login with the credentials provided. Your password seems to be incorrect.

    Screenshot for your reference:
    https://i.rankmath.com/XrJmiW

    Meanwhile, Could you please tell us if you have added the page id in the code?

    add_filter( 'rank_math/opengraph/type', function( $type ) {
     if(is_page('ENTER_YOUR_PAGE_ID_HERE')){ 
         return "service";
     }
    	return $type;
    });

    I hope that helps. Thank you, and looking forward to your update.

    Yes, I had put in the whole code. But I will now setup a custom Scheme Markup. Thanks for your help.

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

The ticket ‘The scheme type doesnt change’ is closed to new replies.