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
-
Breadcrumbs on Mobile How important are they for SEO?
Due to Poor unsightly look of breadcrumbs and the space it takes up above the fold we only employ breadcrumbs on our desktop version. Breadcrumbs are hidden from view on mobile version. However as mobile first indexing is now in play what technical SEO impacts will this have? one thing that comes to mind is crawling deeper pages where breadcrumbs made them accessible in less than 3 link clicks? But i am unsure now of the impacts of not having breadcrumbs visible for mobile version of our site.
Technical SEO | | oceanstorm0 -
Domain forwarding or redirects for SEO?
Hi all! A client of mine owns several top level domains which are not in use, let's call them example.nu, example.de, example.net and so on. The current website is example.com.
Technical SEO | | JHultqvist
When checking the technical status of the unused domains I realized that all but one are forwarded (via DNS) to example.com and only one has a 301 redirect. Should I redirect all of them by means of 301 or let them stay forwarded? Very few of the domains have any other sites linking to them. Any thoughts would be really appreciated! Jesper0 -
Acquired domains for SEO
hi there, For one of our insurance websites we acquired a domain, this domain is going to be redirected to our domain. After some research we discovered the domain we've bought also includes other domains which 301 redirect to specific 'insurance products'. These domains are also included in the deal. But what is the best technical solution for redirecting these specific redirected product domains? They already redirect to the product pages of the domain we've bought, so after redirect this domain, the sub (product) redirected domains will also link to us. It would be like this: A) www.sub-carinsurancesite.nl (301) -> www.domain-we-bought.com/car-insurance -> www.ourdomain.com/car-insurance
Technical SEO | | remkoallertz
B) www.sub-carinsurancesite.nl (301) -> www.ourdomain.com/car-insurance & www.domain-we-bought.com/car-insurance -> www.ourdomain.com/car-insurance etc0 -
Wordpress SEO for ecommerce store
I have been working on a wordpress ecommerce website and want to check that I am doing something correctly so hope someone can help. The Wordpress theme did not allow for an introductory content so the developer built a content page Instead to work as a front end category page so there was more flexibility. I have set the product categories to follow- no index and set the content page as the canonical version and optimised the content page.. question is - is that the right thing to do?
Technical SEO | | musthavemarketing0 -
SEO impact classifieds website
Hi, I'm part of an organization running a classifieds platform in Spain. (Mercadonline.es) We are hit by Google penalties since a few weeks, possibly caused by numerous errors we are experiencing. Most frequent errors are 404's and duplicate content (titles tags etc) since the nature of our website is dynamic. Many ads change daily, are added or removed, causing Googlebots (and others) to flag us and not being able to see our more unique content. Until what part of our platform should we be indexed? Since we have +34,000 pages indexed (mostly due to internal filter pages) I would need a systematic solution for us to display relevant and unique content, with enough usage of keywords that can bring us back up - we are actually ranked <50 on google for most of our main keywords. It is costing us precious time and money since we can only aquire our visitors (adwords etc) and not being to attract any organically. I can go in more detail with someone who can give me a bit more direction. Your answer is much appreciated! Ivor
Technical SEO | | ivordg0 -
Will I still get Duplicate Meta Data Errors with the correct use of the rel="next" and rel="prev" tags?
Hi Guys, One of our sites has an extensive number category page lsitings, so we implemented the rel="next" and rel="prev" tags for these pages (as suggested by Google below), However, we still see duplicate meta data errors in SEOMoz crawl reports and also in Google webmaster tools. Does the SEOMoz crawl tool test for the correct use of rel="next" and "prev" tags and not list meta data errors, if the tags are correctly implemented? Or, is it necessary to still use unique meta titles and meta descriptions on every page, even though we are using the rel="next" and "prev" tags, as recommended by Google? Thanks, George Implementing rel=”next” and rel=”prev” If you prefer option 3 (above) for your site, let’s get started! Let’s say you have content paginated into the URLs: http://www.example.com/article?story=abc&page=1
Technical SEO | | gkgrant
http://www.example.com/article?story=abc&page=2
http://www.example.com/article?story=abc&page=3
http://www.example.com/article?story=abc&page=4 On the first page, http://www.example.com/article?story=abc&page=1, you’d include in the section: On the second page, http://www.example.com/article?story=abc&page=2: On the third page, http://www.example.com/article?story=abc&page=3: And on the last page, http://www.example.com/article?story=abc&page=4: A few points to mention: The first page only contains rel=”next” and no rel=”prev” markup. Pages two to the second-to-last page should be doubly-linked with both rel=”next” and rel=”prev” markup. The last page only contains markup for rel=”prev”, not rel=”next”. rel=”next” and rel=”prev” values can be either relative or absolute URLs (as allowed by the tag). And, if you include a <base> link in your document, relative paths will resolve according to the base URL. rel=”next” and rel=”prev” only need to be declared within the section, not within the document . We allow rel=”previous” as a syntactic variant of rel=”prev” links. rel="next" and rel="previous" on the one hand and rel="canonical" on the other constitute independent concepts. Both declarations can be included in the same page. For example, http://www.example.com/article?story=abc&page=2&sessionid=123 may contain: rel=”prev” and rel=”next” act as hints to Google, not absolute directives. When implemented incorrectly, such as omitting an expected rel="prev" or rel="next" designation in the series, we'll continue to index the page(s), and rely on our own heuristics to understand your content.0 -
What is with WordPress Dupe issues?
Hi, Just wondering if anyone can explain for me why it seems every tag that is entered in WP blog posts on a site creates a duplicate page (identified by ROGER and friends in SEOmoz crawl)? Obviously if you can offer a solution (apart from the extremely obvious "don't use tags") I would be immensely grateful. Thanks so much,
Technical SEO | | ShaMenz0 -
Rel-canonical tag
Hi, I'm having some confusion with the rel-canonical tag. A few months ago we implemented the rel-canonical tag because we had many errors specifically duplicate page content come upon the SEOmoz web app (mostly because we use tracking code). I had asked what to do about this and was advised by the SEOmoz web app to implement the rel-canonical tag. However, when I'm working on the Keyword Optimizer Tool, it always checks off that I'm using the rel-canonical tag improperly, and then when I go into our sites' CMS for that page and uncheck "Use Canonical URL", the keyword optimizer tool up's my grade for that correction/that I've made an improvement. So my question is if the page I'm working on is the one I want search engines to find, should I not be using the Canonical URL tag? Should the Canonical URL tag only be used on URL's with the tracking code?
Technical SEO | | aircyclemegan0