Support Forum

Title Showing additional separator at the end

AJ Alexander Joannou
Alexander Joannou
Member

Hi, please have a look at http://www.naturheilkraeuter.org/forum

The title shows an additional separator that cannot be removed from the seo options. I tried different configurations but ist is always there. I am using WordPress SEO by yoast, but when I switched that off, though the titles have changed, the separator is still there. So I am assuming it must be a Simple Press issue!?

Thx

13 Answers

New Answer

IK Ike
Ike
Member

Hi Alexander,

Are you referring to the line underneath ‘Kräuterforum’ ?

If not, can you be more specific? Maybe with a screenshot highlighting the separator you are talking about.

Thanks

AJ Alexander Joannou
Alexander Joannou
Member

I mean the separator that is shown at the end of the Meta title in the browser and in the open tab.

YS Yellow Swordfish
Yellow Swordfish
Member

I am going to ask Mr Papa to confirm this later but I believe this has something to do with the WP theme and the way it uses the title tag – but I am not totally sure.

Are you simply wanting to get completely rid of it? If so then you should be able to do that in the forum admin > Components ? SEO options panel….

AJ Alexander Joannou
Alexander Joannou
Member

Yes I want to get rid of it, but it is not the separator I use in the Admin SEO settings. There I have a comma, so it is even more confusing, where the | separator is coming from..

 

edit: sorry no comma, I am using a dash there (-)

YS Yellow Swordfish
Yellow Swordfish
Member

Where I told you to look in the post above. That is where you remove it.

AJ Alexander Joannou
Alexander Joannou
Member

No, I cant remove it there! When I remove it there completely then there is no separator at all.

have a look at the meta title here http://www.naturheilkraeuter.org/forum/kraeuterrezepte/frankfurter-gruene-sosse-rezept

 

you see, the separator I chose in the options is a “-” and still there is this | at the end..

YS Yellow Swordfish
Yellow Swordfish
Member

Well I still need Mr Papa to stop by and help out with this but I believe this to be your WordPress theme…

MP Mr Papa
Mr Papa
Member

still confused.. if you want to use a comma instead of |, change it on the panel Andy said…

If you are simply talking about a potential for extra separator, whatever it is, at the end, there is a fix that should take of that in sp 5.5.1…  WP Seo made a change plus many, many themes and plugins are all competing for the same hook to change the title tag to do their thing…  plugins like WP Seo assume a page is static and try to force their title… for simple press and other plugins that treat a wp page as dynamic (as fully allowed in the wp api), they fail…

If can change some code, I think I can dig up the difference and post it here for you… Or you can just wait for our new release which is tied to WP 4.0 (yup more required changes) due in late August…

AJ Alexander Joannou
Alexander Joannou
Member

still confused.. if you want to use a comma instead of |, change it on the panel Andy said…

no, that is not my problem, I know how to change that.

 

Just to be clear: Please look at the meta title in the browser of the following link: http://www.naturheilkraeuter.org/forum/kraeuterrezepte/frankfurter-gruene-sosse-rezept

There you can see the separator at the end, which I did NOT set by myself in the Forum Admin SEO options.

I already switched WordPress SEO Yoast Plugin off, but it is still there. So if you have any suggestion how to change the code for that fix, it would be nice as it was the reason I registered here in the forum. I am not sure if the future fix will cover my exact problem.

Thank you very much!

MP Mr Papa
Mr Papa
Member

okay, probably easier to replace a whole function than the individual changes.. so in plugins/simple-press/sp-startup/forum/sp-forum-support-functions.php, find this code around line 562

function sp_setup_browser_title($title, $sep, $seplocation='') {
    global $wp_query;

    $sp_sep = '';
    $post = $wp_query->get_queried_object();
    if (isset($post->ID) && $post->ID == sp_get_option('sfpage')) {
        $sp_sep = ' '.$sep.' ';
        $title = preg_replace(($seplocation == 'right') ? '/'.preg_quote($sp_sep).'$/' : '/^'.preg_quote($sp_sep).'/', '', $title);
        $sfseo = sp_get_option('sfseo');
        $title = sp_setup_title($title, ' '.$sfseo['sfseo_sep'].' ');
    }
    $title = apply_filters('sph_browser_title', $title);
    return ($seplocation == 'right') ? $title.$sp_sep : $sp_sep.$title;
}

and then replace it (the whole function) with:

function sp_setup_browser_title($title, $sep, $seplocation='') {
    global $wp_query;

    $sp_sep = '';
    $post = $wp_query->get_queried_object();
    if (isset($post->ID) && $post->ID == sp_get_option('sfpage')) {
        $sp_sep = ' '.$sep.' ';
        $title = preg_replace(($seplocation == 'right') ? '/'.preg_quote($sp_sep).'$/' : '/^'.preg_quote($sp_sep).'/', '', $title);
        $sfseo = sp_get_option('sfseo');
        $title = sp_setup_title($title, ' '.$sfseo['sfseo_sep'].' ');
    }
    $title = apply_filters('sph_browser_title', $title);

    return $title;
}

and see if that solves your problem…