Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Title Showing additional separator at the end
Avatar
Alexander Joannou
Member
Free Members
sp_UserOfflineSmall Offline
Jul 14, 2014 - 8:40 pm

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.o.....sse-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!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 14, 2014 - 10:12 pm

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...

Avatar
Alexander Joannou
Member
Free Members
sp_UserOfflineSmall Offline
Jul 15, 2014 - 3:55 am

Wow cool it worked! Thank you!!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 15, 2014 - 5:58 am

Thanks for the update.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626