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
-
# Tag - opacity and SEO impact
Hello,
Technical SEO | | Tiffany_Barn
I have a query animation 'fade-in-up' on my website: tiffanybarnard.com which moves the H1 tag slightly and fades it in from zero opacity to 1. Will this affect the SEO value of the H1 tag?
Thank you!0 -
Rel canonical between mirrored domains
Hi all & happy new near! I'm new to SEO and could do with a spot of advice: I have a site that has several domains that mirror it (not good, I know...) So www.site.com, www.site.edu.sg, www.othersite.com all serve up the same content. I was planning to use rel="canonical" to avoid the duplication but I have a concern: Currently several of these mirrors rank - one, the .com ranks #1 on local google search for some useful keywords. the .edu.sg also shows up as #9 for a dirrerent page. In some cases I have multiple mirrors showing up on a specific serp. I would LIKE to rel canonical everything to the local edu.sg domain since this is most representative of the fact that the site is for a school in Singapore but...
Technical SEO | | AlexSG
-The .com is listed in DMOZ (this used to be important) and none of the volunteers there ever respoded to requests to update it to the .edu.sg
-The .com ranks higher than the com.sg page for non-local search so I am guessing google has some kind of algorithm to mark down obviosly local domains in other geographic locations Any opinions on this? Should I rel canonical the .com to the .edu.sg or vice versa? I appreciate any advice or opinion before I pull the trigger and end up shooting myself in the foot! Best regards from Singapore!0 -
Implementation of rel="next" & rel="prev"
Hi All, I'm looking to implement rel="next" & rel="prev", so I've been looking for examples. I looked at the source code for the MOZ.com forum, if anyone one is going to do it properly MOZ are. I noticed that the rel="next" & rel="prev" tags have been implemented in the a href tags that link to the previous and next pages rather than in the head. I'm assuming this is fine with Google but in their documentation they state to put the tags in the . Does it matter? Neil.
Technical SEO | | NDAY0 -
SEO quandary advice needed
I'm in a bind, I've been working on my SEO for a while now and have finally landed on the top page for [fishing kayak reviews] in Google US. The problem is it's not the page I want to be ranked! I've recently updated my reviews component to a more robust system but the url is slightly different. Looking currently [Reviews without Images] http://www.yakangler.com/fishing-kayak-reviews is ranking in Google but I would like [Reviews with Images] http://www.yakangler.com/fishing-kayak-review to rank instead. What would be the best solution for this problem? Adjust the url for [Reviews with Images] so it take the place of [Reviews without Images]? Do you think I will get any negative impacts from this?
Technical SEO | | mr_w0 -
REL CANONİCAL
Hi, The Original Page: http://www.enakliyat.com.tr/evden-eve-nakliyat-firmalari/ Page 2: http://www.enakliyat.com.tr/evden-eve-nakliyat-firmalari/?sayfa=2 Page 3: http://www.enakliyat.com.tr/evden-eve-nakliyat-firmalari/?sayfa=3 Page 4:http://www.enakliyat.com.tr/evden-eve-nakliyat-firmalari/?sayfa=4 we added this rel="canonical" href="http://www.enakliyat.com.tr/evden-eve-nakliyat-firmalari/" /> tag all these pages Is it right?
Technical SEO | | iskq0 -
Problem with Rel Canonical
Background: We check to make sure that IF you use canonical URL tags, it points to the right page. If the canonical tag points to a different URL, engines will not count this page as the reference resource and thus, it won't have an opportunity to rank. If you've not made this page the rel=canonical target, change the reference to this URL. NOTE: For pages not employing canonical URL tags, this factor does not apply. Clearly I am doing something wrong here, how do I check my various pages to see where the problem lies and how do I go about fixing it?
Technical SEO | | SallySerfas0 -
Importance of SEO Friendly URLs
Hey SEOZ! How important do you all think SEO friendly URLs are to SEO. Here is an example: Non: http://www.domain.com/cart.php?m=product_detail&p=2964 Friendly: http://www.domain.com/product_name_here.html I have always heard mixed reviews but did an experiment comparing results on the same domain and actually noticed quite a difference with the friendly ones. Thanks!
Technical SEO | | 6thirty0 -
Frustrating Local Seo Question
I have just lost the top stop on Google Places (Pack 7) for one of my clients. The company that took it came out of nowhere to take the top stop. Now I don't mind getting out ranked when someone has worked hard to out rank me but what is frustrating is this site scores terrible across the board on just about every score that is supposed to determine on and off page ranking factors. The only place it outscores is in the link department but the site is so new there is no data available in OSE. The site has 0's and 1's for PA, MR and MT plus the keyword (kitchen remodeling) that it is taking the top spot for scores and F in the SEOMoz on page report card while the page that I optimized for this very same keyword scores an A. Plus this site has zero citations according to Bright Local Data. What Gives? Here is a little bit of data: Keyword: Kitchen Remodeling My Clients website is http://www.tandmkitchens.com Competitors website: http://www.njkitchendesigns.com I'm kicking his butt in every category except Domain Age and inbound link total, his inbound link total is 409 but it's only from 2 domains.
Technical SEO | | fun52dig
Any thoughts on how this is possible would be greatly appreciated. Thanks all and Merry Christmas!
Gary1