Forums

[Plugin: All in One SEO Pack] Troubles with AIOSP (2 posts)

  1. alain91
    Member
    Posted 3 years ago #

    Hi,

    I'm a new user of AIOSP but I raised some strange behaviour of this module. Specialy with the replacement of description annd keywords.

    The first part of wp_head seems to take into account the type of displayed page (is_home, is_single,...) but once $description or $keyword is filled the next test add an !(is_home() && is_paged()) which cancel any replacement for those page's type.

    For my site I canceled those tests and now it works like expected.

    I have also added an is_category() somewhere to replace description and keywords with generic options.

    By the way, I added in replace_title a str_replace with %blog_title% or %blog_description% to allow usage of macro in title for home pages for example.

    May be this could help someone with same problems and those features could be integred in future version of AIOSP.

    Best regards

  2. alain91
    Member
    Posted 3 years ago #

    Some details on the bug identified in my previous post :
    line 671
    if (isset($description) && (strlen($description) > $this->minimum_description_length) /* && !(is_home() && is_paged()) */) {

    line 700
    if (isset ($keywords) && !empty($keywords) /* && !(is_home() && is_paged()) */) {

    line 723
    if (is_page() && !empty($page_meta)) { // Alain GANDON suppression du isset redondant avec !empty

    line 730
    if (is_single() && !empty($post_meta)) { // Alain GANDON suppression du isset redondant avec !empty

    line 766

    function replace_title($content, $title) {
    		$title = trim(strip_tags($title));
    		// Alain GANDON ajout de macronames pour la page HOME qui n'est pas traitée ailleurs
    		$title_new = $title;
    		$title_new = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_new);
    		$title_new = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title_new);

    line 786
    $header = substr($content, 0, $start + $len_start) . $title_new . substr($content, $end);

Topic Closed

This topic has been closed to new replies.

About this Topic