• Resolved Tingwe

    (@tingwe)


    Hi @geminilabs

    Is it possible to have an option: if approved reviews from the page/post could automatically save/call that page/post last modified date?

    The reason I ask this is because Site Reviews doesn’t make any changes to the page/post -> url in the sitemap still shows the old last modified date -> search engine assumes that there is no update from that page/post and doesn’t need to recrawl -> search engine keep show page/post old data aggregate review (review-summary).

    Thanks & Regards.

Viewing 1 replies (of 1 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    You could use the “site-reviews/review/created” hook to do this.

    For example, to update the modified date of an assigned Post when a review is created, you could do something like this:

    add_action('site-reviews/review/created', function ($review) {
        $review = glsr_get_review($review->ID); // get a fresh copy of the review
        foreach ($review->assigned_posts as $postId) {
            wp_update_post(['ID' => $postId]);
        }
    }, 20);
Viewing 1 replies (of 1 total)
  • The topic ‘Page/post Last modified’ is closed to new replies.