Add Date Modified to Article and Review

#7691
  • Resolved Webwave
    Rank Math free

    Hello community,

    I am trying to add dateModified property to review and article. I tried with

    // add_filter( 'rank_math/snippet/rich_snippet_review_entity', function( $data ) {
    	set( $data['dateModified'] );
    	return $data;
    }, 10, 1 );

    But gives me error. Which code snippet shoud i use?

    • This topic was modified 5 years, 6 months ago by Webwave.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    You have the right filter but you will need to add some logic to tell the plugin where to get this value from. Here is an example:

    add_filter( 'rank_math/snippet/rich_snippet_review_entity', function( $entity ) {
    	global $post;
    	$entity['dateModified'] = $post->post_modified;
    	return $entity;
    }, 10, 1 );

    I hope this info helps. Thank you.

    ​​​​​​​

    Thanks! Is somewhere any list of available entity that we are allowed to add which is not added by default by RM?

    Todd
    Rank Math free

    Hello,

    We are glad to have helped.

    We do not have a list. Sorry.

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

The ticket ‘Add Date Modified to Article and Review’ is closed to new replies.