Jump to content

Creating rel="next" and rel="prev" links on paginated pages.


alexcapes
 Share

Recommended Posts

**Sorry for clipped post title!**

Hi,

I standard have pagination setup on a 'news' section of a site I'm working on.

I've noticed that Google has picked up the /page2/ etc pages. I've looked into excluding these paginated pages from Google's index and found that rel=next + rel=previous HTML link elements is the way to go.

So I need to add this on the first page:

<link rel="next" href="http://www.example.com/article/page2" />

And then on subsequent paginated pages...

<link rel="prev" href="http://www.example.com/article/page2" />
<link rel="next" href="http://www.example.com/article/page4" />

And one previous link on the last page, for example:

<link rel="prev" href="http://www.example.com/article/page6" />

I've dug around and can't seem to work out how this might be possible with Processwire (I'm sure it's simple as all these things seem to be with Processwire).

Can anyone help?

Edited by adrian
Fix title, but note that you can do this yourself with the Full Editor
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...