Forum Replies Created
-
AuthorPosts
-
May 19, 2015 at 1:25 am in reply to: Alter title for paginated multi-page posts(add Page 2 etc) #152696SonicviewMember
We posted at the same time, sorry
if you wish to have separate SEO titles for each section and not rel canonical , then I suspect you would need separate meta descriptions as well.. (otherwise GWT will moan about there being duplicate meta descriptions)
I don't include descriptions on paged content, only on the first page, because in the absense of a description tag Google grabs text from the page which is fine with me(for now, I have bigger wordpress issues to tackle). Google also announced that you should not use rel-canonical to point to the first part of any series of pages UNLESS they are highly identical. They expanded on that in a few places and were very clear that it should not be used in that manner, nor should you place a noindex tag on page 2 onwards. If you use the rel next and rel prev tags Google will know it's a series and so noindex and rel canonical to page 1 are not needed.
Anyway, I seem to have a larger problem. While the fix I posted above does work for my purposes I realized that it ONLY works because the plugin having troubles is pulling the info independently of the genesis loop, It does grab the information from genesis but it does not work anywhere else using the_permalink, not even in a twitter button, they all point to the first page.
In fact I can't even use the_permalink or get_permalink anywhere as these do NOT grab the page number for me right now. Is genesis altering or moving the_permalink function somewhere ?
May 18, 2015 at 11:44 pm in reply to: Alter title for paginated multi-page posts(add Page 2 etc) #152680SonicviewMemberAdding the following delimited section to genesis/lib/structure/header.php works
function genesis_default_title( $title, $sep, $seplocation ) { global $wp_query; if ( is_feed() ) return trim( $title ); // attach page number to paginated pages... <strong>global $page; if( $page > 1 ) { $title .= ' (Page ' . $page . ')'; } // done attaching
But is that safe and is there a function file equivalent so that I don't have to hard code it?
May 18, 2015 at 10:52 pm in reply to: Alter title for paginated multi-page posts(add Page 2 etc) #152663SonicviewMemberUgh, wait, your function DID work but only at changing the titles on the page, not in the browser tab (HTML wp_head area). I'm lost as to why it would change the title for H1 on page but not the title in the browser tab ?? any other suggestions??
May 18, 2015 at 10:47 pm in reply to: Alter title for paginated multi-page posts(add Page 2 etc) #152662SonicviewMemberNope, it's not a canonical issue, I don't want all paginated content pointing to page one via a canonical tag. The problem is that there seems to be no way to add "Page 2" etc to a multi-page post. The title on every page is the same. The options allow me to add the site name but there is no way to perform a conditional check for paged content from there.
Your function should work, but doesn't for some reason. This is in the genesis header for my site
'function genesis_do_title() { echo '<title>'; wp_title( ''); echo '</title>'; }'
and it's called on and modified by
function genesis_default_title( $title, $sep, $seplocation ) { global $wp_query; if ( is_feed() ) return trim( $title ); ETC....
Here is the part specific to single pages, which I assume would be where to append the page number on multi-page posts?
//* if viewing a post / page / attachment if ( is_singular() ) { //* The User Defined Title (Genesis) if ( genesis_get_custom_field( '_genesis_title' ) ) $title = genesis_get_custom_field( '_genesis_title' );
I've tried turning off all plugins and turning on/off all SEO settings within Genesis and no go. It's not a cache issue either, the site doesn't run cache and I cleared browser cache on both computers I'm testing with. I feel so close yet... this is the most recent version of genesis btw and I run the metro-pro theme which shouldn't matter. Thanks for helping, this is driving me nuts.
May 18, 2015 at 12:13 pm in reply to: Alter title for paginated multi-page posts(add Page 2 etc) #152584SonicviewMemberMaybe I wasn't clear? I need to eliminate duplicate titles from paginated <!-- nextpage --> posts. Is there a way to add "Page 2", "page 3" etc to the end of the site title on paginated posts ?
SonicviewMemberHi Christoph, I used the link you suggested and modified my functions file, mission accomplished. I needed to remove the author link from under the title since it is redundant in my setup, I have a different about/author site.
Thanks
-
AuthorPosts