Full article in Article Schema

#405388
  • Resolved Mats Rossing
    Rank Math free

    Hey,

    I’ve just been recommended by a Semantic SEO expert that I should have the entire article in the Article Schema under Article Body.

    I’ve enabled the Article Schema, but I don’t have the Article Body.

    Looking forward to your reply 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • Prabhat
    Rank Math agency

    Hello,

    Thank you for contacting the support.

    We do not add the articleBody property to the Article Schema as it is not present in the Google’s documentation for the Article Schema: https://developers.google.com/search/docs/advanced/structured-data/article

    However, if you wish to add it, you can modify (if required) and add the below filter to the website and see if that gives you the desired output:

    /**
     * Filter to change the schema data.
     * Replace $schema_type with schema name like article, review, etc.
     * @param array $entity Snippet Data
     * @return array
     */
    add_filter( "rank_math/snippet/rich_snippet_article_entity", function( $entity ) {
            global $post;
    	$entity['articleBody'] = wp_strip_all_tags( $post->post_content );
            return $entity;
    });

    Here’s how you can add the filter:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope this helps.

    Thank you.

    Thanks a lot! That seemed to work perfectly

    Prabhat
    Rank Math agency

    Hello,

    We are super happy that we could address your concern. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind us 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 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 3 replies - 1 through 3 (of 3 total)

The ticket ‘Full article in Article Schema’ is closed to new replies.