aioseop_home_page_title does not get applied anymore
-
Hi,
i have been happily using all in one seo pack on a couple of my sites. i am making use of dynamic data on my page / post / home titles.
example title could be:
best blue widgets in [getYear]
in this example [getYear] would dynamically be replaced with 2013for that i’m add_filter, to hook into for instance the aioseop_description, aioseop_post_title, aioseop_keywords, aioseop_home_page_title
so far this have always worked good.
I did not update the all in one seo pack for a while. i have recently updated all in one seo pack to the latest version (2.02) and noticed the ‘aioseop_home_page_title’ does not get applied anymore. With the aioseop_home_page_title i was able to hook into the homepage title, now i’m not anymore.
Can this be added again to the plugin?
if not, is there a workaround?here some stuff to make it easiest:
Current sourcecode aioseop_class.php, function get_aioseop_title, line 1497-1511: doesn’t apply the aiseop_home_page_title filter
if ( is_front_page() ) { $title = $this->internationalize( $aioseop_options['aiosp_home_title'] ); if ( empty( $title ) && !empty( $post ) && $this->is_static_front_page() ) { $title = $this->internationalize( get_post_meta( $post->ID, "_aioseop_title", true ) ); if ( empty( $title ) ) $title = $this->internationalize( $post->post_title ); if ( empty( $title ) ) $title = $this->internationalize( $this->get_original_title( '', false ) ); if ( !empty( $title ) ) $title = $this->apply_page_title_format( $title ); } if (empty( $title ) ) $title = $this->internationalize( get_option( 'blogname' ) ); return $this->paged_title( $title ); } else if …
Fixed version could be: rely on the else-if a couple of lines down (like older versions of aioseop did)
if ( is_home() && !$this->is_static_posts_page() ) { $title = $this->internationalize( $aioseop_options['aiosp_home_title'] ); if ( empty( $title ) && !empty( $post ) && $this->is_static_front_page() ) { $title = $this->internationalize( get_post_meta( $post->ID, "_aioseop_title", true ) ); if ( empty( $title ) ) $title = $this->internationalize( $post->post_title ); if ( empty( $title ) ) $title = $this->internationalize( $this->get_original_title( '', false ) ); if ( !empty( $title ) ) $title = $this->apply_page_title_format( $title ); } if (empty( $title ) ) $title = $this->internationalize( get_option( 'blogname' ) ); return $this->paged_title( $title ); } else if …
Alternate fix: do apply the aiseop_home_page_title filter here as well
if ( is_front_page() ) { $title = $this->internationalize( $aioseop_options['aiosp_home_title'] ); if ( empty( $title ) && !empty( $post ) && $this->is_static_front_page() ) { $title = $this->internationalize( get_post_meta( $post->ID, "_aioseop_title", true ) ); if ( empty( $title ) ) $title = $this->internationalize( $post->post_title ); if ( empty( $title ) ) $title = $this->internationalize( $this->get_original_title( '', false ) ); if ( !empty( $title ) ) $title = $this->apply_page_title_format( $title ); } if (empty( $title ) ) $title = $this->internationalize( get_option( 'blogname' ) ); return apply_filters( 'aioseop_home_page_title', $this->paged_title( $title ) ); } else if …
https://www.ads-software.com/extend/plugins/all-in-one-seo-pack/
- The topic ‘aioseop_home_page_title does not get applied anymore’ is closed to new replies.