Support Forum

Dupicate Titles

43 Answers

New Answer

JM James Mueller
James Mueller
Member

I believe I can wait for Steve, but wondering when he’ll be back?

JM James Mueller
James Mueller
Member

Did Steve have a chance to look at this?

Thanks.

YS Yellow Swordfish
Yellow Swordfish
Member

I don’t think he has paid a visit yet. He only got in late last night!

YS Yellow Swordfish
Yellow Swordfish
Member

Steve – can you help me out with this one please…

MP Mr Papa
Mr Papa
Member

are you actually using (and thus editing) our default theme? asking because we highly recommend not editing our themes…  just want to make sure you edited the theme you are actually using vice just default…

other than that, no real ideas since its alleviated the situation for all users to date…  and in our testing…

JM James Mueller
James Mueller
Member

Hey Steve.  No, I have not edited the theme.  What makes you think we’ve edited the theme?

Theme: http://screencast.com/t/iGtqObIB
I don’t recall; making changes here; I assume it’s the default.

 

MP Mr Papa
Mr Papa
Member

in post #10, you said you made the suggested changes… that would be editing your sp theme…

so if you have not made the suggested edits, please try them…

JM James Mueller
James Mueller
Member

Okay, I’ve gone over everything one more time…

Post 8 —
I never received a response to my question in this post, I’m assuming those ‘title’ solutions are not options.

Post 9 —
Steve suggests this post: http://tinyurl.com/l8pb7r9

Post 10 —
I tried both of the functions (below) in Steve’s suggested post:  http://tinyurl.com/l8pb7r9

“““““““““““““““““““““““““““““““““““`

Implemented each function here:

/wp-content/sp-resources/forum-themes/default/templates/spFunctions.php

FUNCTION #1

function my_canonical_exclude( $canonical ) {
        if ( sp_is_forumpage() ) $canonical = false;
        return $canonical;
    }
    add_filter( ‘wpseo_canonical’, ‘my_canonical_exclude’ );

 

FUNCTION #2

function my_canonical_exclude( $canonical ) {
        global $post;
        if ( $post->ID == 11974 ) $canonical = false;
        return $canonical;
    }
    add_filter( ‘wpseo_canonical’, ‘my_canonical_exclude’ );

NOTE the above ‘ID’ matches our forum page ID

“““““““““““““““““““““““““““““““““““`

— By the way, when I implement Function #2 in my default template, the title text
appears at the top of my page. Please see >> http://screencast.com/t/0mx3kl3xyfr

— I see this addressed here >> http://tinyurl.com/lvodl9l
But the fix — for me at least — is not clear. One guy ‘fixed’ the issue by changing to Catalyst SEO.

— These are my SEO settings >> http://screencast.com/t/tF58MsPqTT

— To recap. the *only* code changes I’ve made is adding the function above.

Thanks for your help.

 

MP Mr Papa
Mr Papa
Member

is 11794 the id of you page the forum appears on?  It needs to be your page id…  and assume you dont have that function in there twice, just #2

JM James Mueller
James Mueller
Member

 

1. If I edit the forum Page, that id appears in the url, like this:

/wp-admin/post.php?post=11974&action=edit

Above is the page which simple-press displays the forums.

2. Correct, only the #2 function is in spFunctions.php

MP Mr Papa
Mr Papa
Member

well, since this is still a unique report, guess we need a closer look…  If you are you willing to provide a temp wp admin account with full sp admin capabilities, we can take a closer look…  if that works, please pm the details, link to site and link to this topic to both yellow swordfish and myself…  we may need ftp access if we have to add some special debug code, but lets hold off on that for now…

MP Mr Papa
Mr Papa
Member

what have you done to the theme?  why is the spFunctions.php file from the unified theme when you are running the default theme?  looks a bit strange…

not sure where you think you are getting duplicate titles??  just google webmaster?  might be outdated…

but really, you dont have any titles in  your pages… looks like genesis and wp seo are playing nice, but genesis it outputting it on page vs html head tags…

see this and do the change:  https://simple-press.com/support-forum/sp5-general-topics/forum-topic-title-showing-at-top-of-page/#p129907

then we can see if the titles start showing…  and if they do, they wont be duplicate…

except for maybe jetpack which is screwing up the OG tags anyways…  you’d be better off using the OG tag stuff from wp seo than jetpack…

JM James Mueller
James Mueller
Member

Steve

Not sure where you think you are getting duplicate titles??  just google webmaster?  

Google Webmaster reported (correctly) on the dupe titles. After I installed the function (above) the dupes went away. They are now blank.

what have you done to the theme?  why is the spFunctions.php file from the unified theme when you are running the default theme?  looks a bit strange…

Ahh, possible I copied the same modified file to the unified folder.  At the time, I wasn’t sure which theme we were using.

except for maybe jetpack which is screwing up the OG tags anyways…  you’d be better off using the OG tag stuff from wp seo than jetpack

And, please clarify, not sure what you mean… What is “OG”?

“““““““““““““““

Okay. I implemented your suggested function >>
https://simple-press.com/support-forum/sp5-general-topics/forum-topic-title-showing-at-top-of-page/#p129907  

In to >>  /wp-content/sp-resources/forum-themes/default/templates/spFunctions.php

So now, in above spFunctiuons.php  there are 2 new functions:

“““““““““““““““

function my_canonical_exclude( $canonical ) {
        global $post;
        if ( $post->ID == 11974 ) $canonical = false;
        return $canonical;
    }
add_filter( ‘wpseo_canonical’, ‘my_canonical_exclude’ );

add_action(‘sph_forum_startup’, ‘do_my_title_filter’);
function do_my_title_filter() {
    remove_filter(‘wp_title’, ‘sp_setup_browser_title’, 99, 3); # want it to run last
    add_filter(‘wp_title’, ‘sp_setup_browser_title’, 10, 3); # want it to run last
}

“““““““““““““““

— I tested this page >> http://tinyurl.com/n22r8xe
— I believe we’re back to the ‘duplicate title’ situation (all titles the same)
— The good news is, the title text that was displaying in the upper-left corner of the page is gone.

 

 

 

Thanks, Steve.

 

 

 

 

MP Mr Papa
Mr Papa
Member

OG = Open Graph…  its a facebook thing…  you have the OG tag stuff enabled in your jetpack set up… but its doing the forum pages wrong…

unfortunately, the permissions on your sp themes is incorrect and I cannot edit the theme from the theme editor…

so in this:

    add_filter(‘wp_title’, ‘sp_setup_browser_title’, 10, 3); # want it to run last

can you try changing the 10 to 16?