• Resolved monoor

    (@monoor)


    Why do I always receive notices about this in my debug log:

    PHP Notice:  Trying to get property 'post_content' of non-object in /home/kama/public_html/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php on line 510
    
    PHP Notice:  Trying to get property 'ID' of non-object in /home/kama/public_html/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.php on line 510
Viewing 1 replies (of 1 total)
  • Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @monoor,

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

    Could you please confirm if you’re using a template or Elementor template for your shop page?

    If so, then you can try to add the following filter on your website and see if that works for you:

    add_filter( 'rank_math/opengraph/pre_set_content_image', function( $return ) { if(is_shop()){ return true; // Set to true if you don't want to set image from Content. } });

    Here’s how you can add filter/hook to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps.

Viewing 1 replies (of 1 total)

The topic ‘class-image.php on line 510’ is closed to new replies.