Problems in tag meta head

#79766
  • Resolved amir zarbakhsh
    Rank Math free

    Hello
    I have an online game website
    The meta tag in the head does not fit my site
    How can I modify or delete or personalize them !?


    img url : https://ibb.co/JsQNNGK

    For example I want the following:

    <meta property="og:type" content="article">

    In a way that is more appropriate for the topic of my site: <meta property="og:type" content="game">

    Or I want the following section not to be on my site:

    
    <meta property="article:tag" content="الالعاب الجديدة ⚾">
    <meta property="article:tag" content="العاب 1">
    <meta property="article:tag" content="العاب مجانية جديدة 🆓😍">
    <meta property="article:tag" content="العاب مغامرات جديدة">
    <meta property="article:section" content="العاب مغامرات 🗿">

    Because I deleted the tag and category url on my site.

    Also for category meta tags and tags


    URL IMG:https://ibb.co/DrXZhCc

    I want the following section :
    <meta property="og:type" content="object">
    It should look like this: <meta property="og:type" content="website"/>

    And there is no code (`<link rel=”next” href=”” />) in it.

    Is it possible to apply the corrections I have in mind without any problem in the new update !?

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

    Thank you for contacting Rank Math today.

    You can use the following filter to change the OpenGraph values: https://rankmath.com/kb/filters-hooks-api-developer/#change-specific-social-meta

    Here is an example to remove the article:tags and to change the og:type values:

    
    add_filter( 'rank_math/opengraph/facebook/article_tag', '__return_false' );
    add_filter( 'rank_math/opengraph/facebook/article_section', '__return_false' );
    add_filter( 'rank_math/opengraph/facebook/og_type', function( $type ) {
    	return 'game';
    } );
    

    Please add this code to your theme’s functions.php file.

    I hope that helps.

    Hello
    Thankful
    I was able to solve some of my problems.

    But I still have a problem

    I want my site home page to have an og:type and categories and tags to have a different og:type and my site posts to have a different og: type.

    How can I implement this?

    Michael Davis
    Rank Math pro

    Hello,

    Thank you for the follow up.

    You can use the filter code provided previously and add an if to check what page it is. For example:

    Homepage: if(is_home() || is_front_page()){//add some og type}
    Category: if(is_category()){//add some og type}
    Tag: if(is_category()){//add some og type}
    ​​​​​​
    For further customization on the same you might have to hire a developer.

    Hope that helps you. Thank you

    amir zarbakhsh
    Rank Math free

    Thank you

    Michael Davis
    Rank Math pro

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘Problems in tag meta head’ is closed to new replies.