Jump to content

Adding pagination rel=next and and NoIndex to Click2Search pages


angel

Recommended Posts

Hi there,

 

I'm on version 2.2 and would like to add some SEO fixes on listing pages:

1) Add rel="next" and rel="prev" to pagination

2) Add noindex for different the different ordering settings except the original

 

Can you let me know which files I should be looking at to get this done.

 

For #1 pagination, I have got this far:

- I know for pagination it is the "$Paginator->display_pages()" function.

- I copied the Pagination Helper file from jreviews version 2.3 to my this installation version 2.2 and it works fine

- However it is still not adding in rel="next" or prev  yet although I see a function for it as follows at the end of the file:

 

/**

* http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html

* @param type $page

*/

function addPrevNextUrls(&$page) {

if($this->num_pages > 1) {

if($this->current_page == 1) {

$page['next_url'] = $this->getPageUrl(2);

}

elseif($this->current_page == $this->num_pages) {

$page['prev_url'] = $this->getPageUrl($this->num_pages-1);

}

else {

$page['prev_url'] = $this->getPageUrl($this->current_page-1);

$page['next_url'] = $this->getPageUrl($this->current_page+1);

}

}

}

 

 

Thanks.

Link to comment
×
×
  • Create New...