Wordpress rel next & previous for SEO
-
Hi,
I have implemented this function into my wordpress theme. However, I can only get the prev rel to show up. Does anyone have an idea?
function rel_next_prev(){
global $paged;if ( get_previous_posts_link() ) { ?>
}if ( get_next_posts_link() ) { ?>
}}
add_action( 'wp_head', 'rel_next_prev' );
?> -
Hi There
I also do not know how this is done at the coding level in WordPress. The Yoast plugin handles it automatically - that's probably the least painful to get it implemented!
-
This exact question has also been asked on here previously, but without a solution I'm afraid.
I would guess it is something within the theme that is causing this - but what, I do not know. The Yoast SEO plugin is supposed to handle this somehow, but it seems no-one knows how.
Sorry I can't be more help on this one.
-Andy
-
I have page 2, 3, 4 etc.
Somehow the get_next_posts_link() is not fetching anything. In my source, I only have no matter what page I'm on, and it's always fetching the prev link correctly.
-
I know this might sound like a bit of a daft question, but you do have a page 2 of your blog? And if so, when you view the source of that page, do you see something like this?
"prev"` `href=
"http://example.com/">
**``"next"
href=``"http://example.com/page/2/"``>``**
-Andy
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
If I change Tags and Categories in Wordpress blog post, will it negatively affect SEO and cause 404s?
Hi, I have belatedly come to the conclusion that I have been using tags and categories when blogging in wordpress incorrectly. The result is that Google seems to prefer to show my archives and tags in search results rather than the post itself. Not good UX. As the site is only a few months old, am I best to learn my lesson and tag and categorize correctly moving forward or Should I go back in to these posts and clean them up & categorize and tag correctly. If I do this, will it cause 404s and hurt my SEO? Thanks!
Technical SEO | | johnyfiveisalive2 -
Wordpress pagination and SEO
Hello Mozzers, We have incorporated Wordpress blog in our website. The blog has a fair share of what we believe is a valuable content both for the users and SEO. We have reached the point where our content is getting pushed out to pages 2, 3 and etc. 99% of the older content is still relevant and useful. However it does get less traffic from the users because it is not on the front page. I am dealing with it by showing "related posts" and get some traffic through that. I feel that the content that got pushed from the front page of the blog gets less love from search engines as well.The my permalink structure is /%postname%/ only, however when Wordpress adds page/1/ the SEO ranking appears to drop. Is it because Wordpress adds page/1/ to the address? What is a good way to optimize is? I have 15 posts showing on the front page should I increase it?
Technical SEO | | SirMax0 -
Squarespace or Wordpress for a Photographer
Hi, I was wondering if people would recommend squarespace or wordpress for a photographer. I'm mainly curious about how wordpress uses internal links for their images and squarespace images exist on http://static1.squarespace.com. Wouldn't a photographers website, one that focuses on images, be better on wordpress for this readson?
Technical SEO | | mattdinbrooklyn1 -
Rel= Canonical
Almost every one of my product has this message: Rel Canonical (Using rel=canonical suggests to search engines which URL should be seen as canonical. ) What is the best way to correct this?
Technical SEO | | tiffany11030 -
Using category pages in Wordpress
In our niche we have one main keyword, which represents the entire category. We are using wordpress. I am trying to understand the best URL structure and wonder if the below is a good approach: http://domain.com/keyword This category page will be written to contain an article on the subject. The posts that are put into that category will subsequently appear on this page, below that article. Each of those posts would be targeting a related keyword. e.g. I would write a post which has, as the main target keyword: "MainKeyword training" and another post, which would be targeting "MainKeyword techniques" ... (and so on). Thanks for your advice. Andrew
Technical SEO | | seowhiskey0 -
Duplicate content + wordpress tags
According to SEOMoz platform, one of my wordpress websites deals with duplicate content because of the tags I use. How should I fix it? Is it loyal to remove tag links from the post pages?
Technical SEO | | giankar0 -
Geotargeting by IP and SEO
Hi, Part of our site displays localized results based on the user's IP (we get the zipcode based on IP). For example a user in NY would get a list of NY based stores, while a user in CA would get a list of CA based stores. So if CA Googlebot comes to our site, it will get results based on Mountain View CA. Given the pages are generated based on your zip, I'm not sure how we'd indicate to Google that we have results for lots of locations and not just the Googlebot IP locations. (users can change their zipcode, but by default we use geolocation). Our landing pages contain localized content and unique urls with the zipcode etc, but it isn't clear how Google will find results for KY etc.
Technical SEO | | NicB10