WP SEO 1.4.4 Homepage Opengraph Bugfixes
-
The options
og_frontpage_image
andog_frontpage_desc
don’t work at all for me. The following patch fixes it.--- ./wordpress-seo/frontend/class-opengraph.php~ 2013-04-05 12:05:45.000000000 +0200 +++ ./wordpress-seo/frontend/class-opengraph.php 2013-04-05 12:02:44.000000000 +0200 @@ -250,11 +250,11 @@ * @return bool */ public function image() { - if ( is_singular() ) { + if ( is_singular() || is_front_page() ) { global $post; if ( is_front_page() ) { - if ( isset( $this->options['og_frontpage_image'] ) ) + if ( isset( $this->options['og_frontpage_image'] ) ) $this->image_output( $this->options['og_frontpage_image'] ); } @@ -284,7 +284,11 @@ * @return string $ogdesc */ public function description( $echo = true ) { - $ogdesc = wpseo_get_value( 'opengraph-description' ); + if ( is_front_page() && isset( $this->options['og_frontpage_desc'] ) ) { + $ogdesc = $this->options['og_frontpage_desc']; + } else { + $ogdesc = wpseo_get_value( 'opengraph-description' ); + } if ( !$ogdesc ) $ogdesc = $this->metadesc( false );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WP SEO 1.4.4 Homepage Opengraph Bugfixes’ is closed to new replies.