Hi, Newspaper 7.4 with Theme mobile
1) I’m looking a way to paging home in theme mobile
to avoid error in google webmaster on title and description
due to pagination in home
http://www.site.com/page/2/… page/3/ …. etc
Yoast in this case does not work fine because if you put
“Page %%page%%” in description and title snippets of home, also
home page in desktop has “Title page – Page 1” and “Decription – Page 1”
and Google search show in title result Page 1 tha is not beautiful…
So i think to put follow function only in functio.php of theme mobile
/** Add Page Number to Meta Description to avoid Duplication **/
function t5_add_page_number( $s )
{
global $page;
$paged = get_query_var( ‘paged’ ) ? get_query_var( ‘paged’ ) : 1;
!empty ( $page ) && 1 < $page && $paged = $page;
$paged > 1 && $s .= ‘ – ‘ . sprintf( __( ‘Page %s’ ), $paged );
return $s;
}
add_filter( ‘wpseo_title’, ‘t5_add_page_number’, 100, 1 );
add_filter( ‘wpseo_metadesc’, ‘t5_add_page_number’, 100, 1 );
This works fine, but pagination is duplicated on categories,
because I use Yoast solution for category pagination.
So I try to put a condition if is_home in above function but
non working.
Question is: how to solve avoid error in google webmaster
relatively to Home of Theme mobile?
2) Another thing to solve is <meta name=”robots” content=”noodp”>
that in home paginated of theme mobile lack attribute no follow.
http://www.site.com/page/2/… page/3/ …. etc
the thing you can not settle with Yoast…
Thanks
Hello,
As I can tell you are comfortable enough around coding to know how to add a nofollow to a link so here is the file where the pagination is being created: http://screencast.com/t/Uoi9VsE4
Add the tag to the links in there and that should do it.
I hope this helps.
Thank you!
Hi Bogdan
thanks, but problem is replace
<meta name=”robots” content=”noodp”>
with
<meta name=”robots” content=”noindex,follow,noodp”>
in home page of mobile theme that has pagination like
http://www.site.com/page/2/… page/3/ ….page/4/ etc
Thanks!
Hello,
There is no such meta property in our theme files anywhere. You cannot replace it as it does not exist in our theme. There is in wordpress however so I think it;s safe to assume you will have to edit wordpress for this one, not the theme. The pagination is a wordpress functionality, not the theme’s.
Thank you!
Yes, but there is no such reference in our theme. I searched through all the theme files and there is no such code. I cannot provide any solution as i do not know where yoast adds the implementation. The mobile theme was not tested with any of the tested plugins of the main theme.
Thank you!