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
-
SEO & IFrame problem
Hi All, I will try and keep this as simple as possible. My product page links to a separate page with an IFrame, giving my users the option to upload artwork for the product. The IFrame contains the external file upload site (mail big file). When finished, the user can use a button link to return to the product page to continue with their order. As soon as the page with the IFrame was crawled by Google, the IFrame page started to rank in place of where my product page used to rank, yet there is no content on the page relating to my product (just a file upload). So now users are visiting the IFrame via the same query which must be an absolute headache and not useful at all. I have tried the following: 1. Added a line in body text which contains an internal link pointing to the product page using exact match anchor text for the query. (This didn't work) 2. I applied a no index tag to the IFrame, and now my product page is no longer ranking at all. Can anyone help me solve this puzzle. I believe I might be missing something. Kind regards, Adam
Technical SEO | | SO_UK0 -
HTTPS & 301s
Hi We have like most set up a redirect from HTTP to HTTPS. We also changed our website and set up redirects from .ASP pages to PHP pages We are now seeing 2 redirects in place for the whole of the website.
Technical SEO | | Direct_Ram
http.www.domain.com > https.www.domain.com (1) >> oldwebpage.asp >> new webpage.php (2) The question is: Is there anyway of making the redirect 1 and not 2? thanks
Enver0 -
Am I doing SEO test properly?
Hello, I just created a page for researching the impact of social signals on Google ranking (in Italy). Page was not optimized (one internal backlink, no other external/internal links, keyword repeated 4 or 5 + h1 h2, no alt tags), and only social signals are being stimulated (through votes). The domain is 2 months old and is already positioned for few relevant keywords, but from 2 page down. My question is: am I doing right? Is this a good way to proceed? And if not, what I should do instead? Thank you for an advice. Eugenio
Technical SEO | | socialengaged0 -
Canonical and Alternate REL
Hi I have a website which is mostly dynamic content from a database. In the header of the site I have a function which outputs the rel="canonical" link and in some cases the canonical is the page the user is visiting and not another page on the site but I still show it in the source. However we have just recently launched our mobile website which is stored on an M DOT domain (i.e. m.mydomain.com) which has different URL's to my main website so following Google's recommendations we have created rel="alternate" links on my desktop site to point to the equivalent mobile pages and on the mobile pages I have created rel="canonical" links which point back to the relevant desktop site keeping everything tidy.
Technical SEO | | yousayjump
My question is, is there an issue with having both a rel="canonical" and rel="alternate" in the source of of a single page on my desktop site? Is it conflicting or detrimental in anyway? Thanks for reading0 -
Wordpress Hatom problem
Hi, in Webmaster Tools i receive the following warnings: hatom-feedhatom-entry:Warning: At least one field must be set for HatomEntry.Warning: Missing required field "entry-title".Warning: Missing required field "updated".Warning: Missing required hCard "author".I googled a few strategies how to solve this problem but is it for SEO purpose really necessary to edit Theme core code to satisfy google's warnings?
Technical SEO | | reisefm0 -
Parallax Scrolling & SEO
Does anyone know the impact of Parallax scrolling from a SEO prospective?
Technical SEO | | AlgoFreaks0 -
REL = cannonical and web app
I started a web app campaign for a site that I recently finished. It had no errors or warnings, but issued rel=cannonical notices for every page on the site. What does this mean?
Technical SEO | | waynekolenchuk0 -
Rel canonical to dissimilar pages
Is there a penalty for implementing a rel canonical between to pages that don't have the same content? I was told that you should avoid using a rel canonical if the pages score lower than 50-60 on the Similar Page Checker: http://www.webconfs.com/similar-page-checker.php The overall theme of the pages I am considering this for are similar but the actual content is different.
Technical SEO | | ryanwats0