homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / WordPress
Forum Library, Charter, Moderators: lorax & rogerd

WordPress Forum

Adding rel- next and prev and canonical links on paginated pages
Plugins do it, but they slow the website.

10+ Year Member

Msg#: 4574383 posted 12:29 pm on May 15, 2013 (gmt 0)

I am looking to add the following meta tags in the header.
<link rel="canonical" href="http://mywebsite.com/auto/page/2/"/>
<link rel="prev" href="http://mywebsite.com/auto/"/>
<link rel="next" href="http://mywebsite.com/auto/page/3/"/>

It is easy to add canonical tags on single pages, but a bit tricky for paginated pages.

Can anyone help me with the code?



WebmasterWorld Administrator lorax us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Msg#: 4574383 posted 5:36 pm on May 15, 2013 (gmt 0)

You'll want to read this: https://codex.wordpress.org/Pagination

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / WordPress
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved