• Hi,

    I’m setting homepage as static page.
    AIO SEO does not retrieve page title, description, etc, from custom fields in that specific static page.

    Instead, it retrieves title, description that set in the plug-in setting section.

    However, in my case, I need SEO homepage attributes to be editable by Editor which doesn’t have a grant access to plug-in setting.

    Are there any solutions to getting around this? Which section in plug-in that I can hard code to ignore attribute from admin setting?

    Please, your help would be really appreciated.

    Cheers

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Chanon Srithongsook

    (@ninenote)

    Found solutions, not wise one, but worked for me.

    In aioseop.class.php

    line 274: Description
    Change something like this

    if ($this->is_static_front_page()) {
    				$description = trim(stripcslashes($this->internationalize($aioseop_options['aiosp_home_description'])));
                } else {
                	$description = $this->get_post_description($post);
    				$description = apply_filters('aioseop_description',$description);
                }

    To

    if ($this->is_static_front_page()) {
    				if($this->get_post_description($post)) $description = $this->get_post_description($post);
    				else $description = trim(stripcslashes($this->internationalize($aioseop_options['aiosp_home_description'])));
                } else {
                	$description = $this->get_post_description($post);
    				$description = apply_filters('aioseop_description',$description);
                }

    Then, for Title line:715

    Change something like this

    if ($this->internationalize($aioseop_options['aiosp_home_title'])) {
    
    							//home title filter
    							$home_title = $this->internationalize($aioseop_options['aiosp_home_title']);
    							$home_title = apply_filters('aioseop_home_page_title',$home_title);
    							$header = $this->replace_title($header, $home_title);
    
    				}

    TO

    if ($this->is_static_front_page()) {
    				if ($this->internationalize(get_post_meta($post->ID, "_aioseop_title", true))){
    				$home_title = $this->internationalize(get_post_meta($post->ID, "_aioseop_title", true));
    				$home_title = apply_filters('aioseop_home_page_title',$home_title);
    				$header = $this->replace_title($header, $home_title);
    				}elseif ($this->internationalize($aioseop_options['aiosp_home_title'])) {
    							//home title filter
    							$home_title = $this->internationalize($aioseop_options['aiosp_home_title']);
    							$home_title = apply_filters('aioseop_home_page_title',$home_title);
    							$header = $this->replace_title($header, $home_title);
    				}

    I’m not quite familiar with WordPress filter.
    However, I believe that you can do something with filter ‘aioseop_home_page_title’ and ‘aioseop_description’

    and put it into theme functions.php. It will not require hardcode.

    Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    I don’t recommend modifying the plugin as you won’t be able to upgrade.

    Hi,

    sorry, any ideas on how I could reuse the AIOSEO title and description tags as content in my tempalte? E.g. for an H1 tag?

    THX

    Can someone maybe help me with this plugin problem as well? http://wordpress.org/support/topic/413487

    Hi,

    Here is the AIOSEO filter approach to allow front page translations. Just paste this in your theme functions.pĥp or create a aioseo-fix plugin :

    /* AIOSEO hack : If using a static front page then use title, description and keywords from page meta instead of AIOSEO config */
    /* Please AIOSEO developpers, could you modify the plugin so that this dirty hack would be useless ? */
    function custom_aioseop_home_page_title($home_title){
    	global $post,$aiosp;
    	if ($aiosp->is_static_front_page() && $aiosp->internationalize(get_post_meta($post->ID, "_aioseop_title", true))){
    		$home_title = $aiosp->internationalize(get_post_meta($post->ID, "_aioseop_title", true));
    	}
    	return $home_title;
    }
    function custom_aioseop_description($description){
    	global $post,$aiosp;
    	if ($aiosp->is_static_front_page() && $aiosp->get_post_description($post)){
    		$description = $aiosp->get_post_description($post);
    	}
    	return $description;
    }
    function custom_aioseop_keywords($keywords){
    	global $post,$aiosp;
    	if ($aiosp->is_static_front_page() && $aiosp->internationalize(get_post_meta($post->ID, "_aioseop_keywords", true))){
    		$keywords = $aiosp->internationalize(get_post_meta($post->ID, "_aioseop_keywords", true));
    	}
    	return $keywords;
    }
    add_filter('aioseop_home_page_title','custom_aioseop_home_page_title');
    add_filter('aioseop_description','custom_aioseop_description');
    add_filter('aioseop_keywords','custom_aioseop_keywords');

    We have made a request on AIOSEO forum so that authors modify the plugin…

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: All in One SEO Pack] Static homepage title to editable by editor user’ is closed to new replies.