Skip Navigation

[Resolved] Add nofollow to

This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 3 replies, has 2 voices.

Last updated by Nigel 5 years, 9 months ago.

Assisted by: Nigel.

Author
Posts
#1289041

Hello,

we use the "Load More" button with

[wpv-pager-next-page][wpml-string context="wpv-views"]Load More[/wpml-string][/wpv-pager-next-page].

we can see the href="/?wpv_view_count=62151&wpv_paged=2" but we dont want google to Follow the url.

How we can add a nofollow tag?

Thank you

#1289401

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi there

You can add a nofollow meta tag to a page to instruct search engines not to index any of the links on that page, or you can add the rel="nofollow" attribute to an individual link to instruct search engines to not index the linked page.

If you want to add the rel="nofollow" attribute to the pagination link, so that Google doesn't index subsequent pages of results, well... there is now way to customise the output of the wpv-pager-next-page shortcode to be able to add it.

You could use JS to add the attribute after the page loads, but I don't see how that would help, because Google will first index the page with JS disabled.

So it seems the only option would be to add the nofollow meta tag to the page itself, so that Google doesn't index any of the links on the page, including the pagination link. Would that be an option?

#1291841

Hello,

Our pagination structure is with ?pg=3 and not with ?wpv_view_count=62151&wpv_paged=2

If Google find the url ?wpv_view_count=62151&wpv_paged=2 we will have lots of not existing urls. We can't add nofollow meta tags in all pages. We just want to ignore ?wpv_view_count=62151&wpv_paged=2 url and let the normal pagination for index pages.

Can we use something difference instead ?

[wpv-pager-next-page][wpml-string context="wpv-views"]Load More[/wpml-string][/wpv-pager-next-page]

We can see that the above sc create the following

 <a class="wpv-filter-next-link js-wpv-pagination-next-link" href="/?wpv_view_count=62151&wpv_paged=2" data-viewnumber="62151" data-page="2">Load More</a>

Can we use the above code and somehow with javascript update the url dynamic every time the Load more button pressed?

Regards,
Aris G.

#1291967

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Paginating a View works via those URL parameters, there isn't an option to modify the format, the choice is to either use Views pagination or not.

On archive pages you can use the pagination links generated by your theme instead of pagination links created with Views, but there is no such option when you add a View to a page which needs paginating.

It sounds like you need to add a NOINDEX meta tag to this particular page, so that Google doesn't index it (or any of the pages of results generated with the Views parameters).

See hidden link

If you are using an SEO plugin you should have such an option available, otherwise you could do it yourself with a little custom code that uses the wp_head action to insert such a meta tag. There's an example of how to do that here: hidden link

You would need to additionally use is_page to check you were only adding the tag to the required page. (See https://developer.wordpress.org/reference/functions/is_page/).