• Resolved pluginsplug

    (@pluginsplug)


    Hi,

    I’m the only one to encounter a problem with the the following function found on Yoast SEO official open-graph documentation?

    function yoast_change_opengraph_type( $type ) {
    	  if ( is_page( 'X' ) )
    	    return 'video';
    	}
    	add_filter( 'wpseo_opengraph_type', 'yoast_change_opengraph_type', 10, 1 );

    The function seems to work but the type of page change from “object” to “website” for me but I wanted to change in “video”. There is a change but not the good one.
    Do you have the same issue on your website ? Thanks in advance.

    PS : Before the last plugin update, everything was fine…

    https://www.ads-software.com/plugins/wordpress-seo/

Viewing 1 replies (of 1 total)
  • Thread Starter pluginsplug

    (@pluginsplug)

    It was a simple error on the type of page… It was not the PHP function is_page(), but is_archive().

    It’s resolved.

Viewing 1 replies (of 1 total)
  • The topic ‘Issue : Change Open-Graph type’ is closed to new replies.