Title: Cannot change og_type
Last modified: August 20, 2016

---

# Cannot change og_type

 *  [sunkast](https://wordpress.org/support/users/sunkast/)
 * (@sunkast)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/cannot-change-og_type/)
 * WordPress version: 3.5.1
    WordPress SEO version: Latest (not sure where to find
   it)
 * So I attempted to switch over to using WordPress SEO for OpenGraph tags from 
   a different plugin that seems to have issues with WP SEO. But have come up with
   a couple issues as a result.
 * I deactivated the plugin I was using before.
 * The first issue is that the og:description is not getting inserted in to any 
   page/post.
 * Secondly, the plugin I was using before had the og:type set as article for my
   homepage. WP SEO wants to set the type as website, but because I was using article
   as the type previously, Facebook throws a fit. Here is the error that I get from
   Facebook when I run the debug.
 * Cannot change og_type: The object at ‘[http://www.guysfromqueens.com/&#8217](http://www.guysfromqueens.com/&#8217);
   previously had type ‘article’ and cannot be changed to an object of type ‘website’
   to avoid data corruption of existing actions.
 * What would be the best way to fix this?
 * [http://wordpress.org/extend/plugins/wordpress-seo/](http://wordpress.org/extend/plugins/wordpress-seo/)

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

 *  [TheMarque](https://wordpress.org/support/users/themarque/)
 * (@themarque)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/cannot-change-og_type/#post-3415553)
 * I am having the exact same problem in the same situation and would love some 
   help.
 *  Thread Starter [sunkast](https://wordpress.org/support/users/sunkast/)
 * (@sunkast)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/cannot-change-og_type/#post-3415632)
 * Okay so in the API documentation I found this snippet of code:
 *     ```
       function yoast_change_opengraph_type( $type ) {
         if ( is_page( 'X' ) )
           return 'video';
       }
       add_filter( 'wpseo_opengraph_type', 'yoast_change_opengraph_type', 10, 1 );
       ```
   
 * I changed the if statement to:
 *     ```
       if ( is_home() )
       ```
   
 * Which worked and fixed my problem. But as a result it’s leaving every other post/
   page without an og:type…
 * Is there any way to fix this without removing the if statement all together? 
   The homepage is the only page that needs the og:type changed.
 *  [manolis09](https://wordpress.org/support/users/manolis09/)
 * (@manolis09)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/cannot-change-og_type/#post-3415641)
 * What about changing it to:
 *     ```
       if ( is_home() ) {
           return 'video';
       } elseif ( is_single() ) {
           return 'article';
       } else {
           return 'website';
       }
       ```
   
 * Have a look at [http://codex.wordpress.org/Conditional_Tags](http://codex.wordpress.org/Conditional_Tags)
   and play around with the tags, if you wanna have more types or change them.
 *  [boborg](https://wordpress.org/support/users/boborg/)
 * (@boborg)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/cannot-change-og_type/#post-3415703)
 * Also having the issue with og:type previously probably being set as article for
   front page by a different plugin and now WP Seo sets it to website so Facebook
   debugger complains.
 * Did you fix it?

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

The topic ‘Cannot change og_type’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

## Tags

 * [description](https://wordpress.org/support/topic-tag/description/)
 * [og:type](https://wordpress.org/support/topic-tag/ogtype/)

 * 4 replies
 * 4 participants
 * Last reply from: [boborg](https://wordpress.org/support/users/boborg/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/cannot-change-og_type/#post-3415703)
 * Status: not resolved