Rich data – still showing incorrect title

#39323
  • Resolved 620 Studio
    Rank Math business

    This is in relation to this closed ticket https://support.rankmath.com/ticket/manually-edit-ogimagealt (I didn’t realize it was closed)

    The solution did fix the og:image:alt but the title is still correct. Doing a search in the code it looks like the only other area it’s pulling from is the last line in the Rank Math meta section:

    <script type="application/ld+json">{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","headline":......

    Is there an additional filter I can add to functions.php to fix this line as well? The ‘headline’ value starts with the site name directly followed by the article title while also delimiting any special characters.

    An example is this source page, Line 41 : view-source:https://www.futuremoneytrends.com/gold

    Thanks for any info you can give!

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math today.

    You can modify the post schema data by using the following filter on your theme’s functions.php file:

    /**
     * Filter to change the schema data.
     * Replace $schmea_type with schema name like article, review, etc.
     * @param array $entity Snippet Data
     * @return array
     */
    add_filter( "rank_math/snippet/rich_snippet_{$schema}_entity", function( $entity ) {
     return $entity;
    });

    Looking forward to helping you. Thank you.

    ​​​​​​

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

The ticket ‘Rich data – still showing incorrect title’ is closed to new replies.