Using aioseop_robots_meta for specific pages to noindex nofollow | Optimizing All in One SEO Pack Pro | Support | Semper Plugins

Avatar
Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSS sp_TopicIcon
Using aioseop_robots_meta for specific pages to noindex nofollow
July 16, 2019
11:26 am
Avatar
Ruth Vant
Member
AIOSEOP
Forum Posts: 10
Member Since:
June 27, 2019
sp_UserOfflineSmall Offline

Hello

 

Can you give me an example of how to use the aioseop_robots_meta to noindex nofollow the page below?

https://www.i-hled.co.uk/produ…..-o/page/2/

 

Thanks

July 16, 2019
1:28 pm
Avatar
Arnaud
Bruges, Belgium
Admin
Forum Posts: 220
Member Since:
April 24, 2016
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

July 17, 2019
4:15 am
Avatar
Ruth Vant
Member
AIOSEOP
Forum Posts: 10
Member Since:
June 27, 2019
sp_UserOfflineSmall Offline

Hello,

Thanks for this, but it’s a pagination page created from the WooCommerce database, does that even have it’s own ID? 

If it does, how would I even find it as these pages are created on the fly?

Is this a question for WooCommerce?

Is there no way to do this with a path?

 

kind regards

Ruth

July 17, 2019
5:19 am
Avatar
Ruth Vant
Member
AIOSEOP
Forum Posts: 10
Member Since:
June 27, 2019
sp_UserOfflineSmall Offline

I’ve added this code to reveal the ID, so hopefully that is correct

 

         <!–?php global $post;
            <!–?php global $post;
                        echo $post->ID; ?>

 

I’ve added the API code to my functions.php file. Should I see any changes in the HTML code of the page, or doesn’t it work like that?

July 17, 2019
6:02 pm
Avatar
Steve Mortiboy
Admin
Forum Posts: 2123
Member Since:
January 5, 2012
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

July 18, 2019
4:25 am
Avatar
Ruth Vant
Member
AIOSEOP
Forum Posts: 10
Member Since:
June 27, 2019
sp_UserOfflineSmall Offline

Hello

Yes I do get the page id in normal pages, but in WooCommerce categories I get this instead for this page. 

term-213 paged-2

When I use PHP to return the page id I get 2126

 

Will your new code work as you are using ‘is_single’ in this version and this is not a single page but a category page which is paginated.

I don’t see any meta in the head for no follow when I add the code.  All of the other meta is appearing such as

<meta property=”og:title” content=”PYO | IHS – Intelligent Horticultural Solutions – Part 2″>

 

kind regards

Ruth

July 18, 2019
9:17 am
Avatar
Steve Mortiboy
Admin
Forum Posts: 2123
Member Since:
January 5, 2012
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

July 18, 2019
9:43 am
Avatar
Ruth Vant
Member
AIOSEOP
Forum Posts: 10
Member Since:
June 27, 2019
sp_UserOfflineSmall Offline

Hello

I can noindex pages, products and categories from within Wordpress and WooCommerce without the need for the API just by using your plugin in the usual way.

What I need to do is noindex/nofollow page 2 of the paginated category page as this is not possible within Wordpress using your plugin.

So either I need code to remove by the path /product-category/light-engines/p-y-o/page/2/ or by ID which is not based on the category or single page.

 

I thought this should work, but it doesn’t

 

add_filter( ‘aioseop_robots_meta’, ‘change_robots_meta_value’ );

function change_robots_meta_value( $robots_meta_value ) {
if( $post->ID == 2126 ) {
$robots_meta_value = ‘noindex,nofollow’;
}
return $robots_meta_value;
}

 
So what I expect I need is a version that works by referencing the page ID. But if your API is relying on drawing that from the body class then it won’t work.
July 18, 2019
9:45 am
Avatar
Steve Mortiboy
Admin
Forum Posts: 2123
Member Since:
January 5, 2012
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

July 18, 2019
9:48 am
Avatar
Ruth Vant
Member
AIOSEOP
Forum Posts: 10
Member Since:
June 27, 2019
sp_UserOfflineSmall Offline

Isn’t that on all paginated pages though?

I only want to target specific ones

July 18, 2019
10:05 am
Avatar
Steve Mortiboy
Admin
Forum Posts: 2123
Member Since:
January 5, 2012
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

July 18, 2019
10:11 am
Avatar
Ruth Vant
Member
AIOSEOP
Forum Posts: 10
Member Since:
June 27, 2019
sp_UserOfflineSmall Offline

Yes!

Brilliant, thank you

 

Ruth

Forum Timezone: America/New_York
Most Users Ever Online: 964
Currently Online:
21
Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Member Stats:
Guest Posters: 36
Members: 22379
Moderators: 0
Admins: 8
Forum Stats:
Groups: 4
Forums: 28
Topics: 2074
Posts: 9009
Newest Members:
Sarah Arvela
Administrators: Michael TorbertPeter BayliesSupport TeamSteve MortiboyMatthew RobinsonSteve Klasen, Arnaud: 220Ashish Ravi
[i]
[i]
Skip to toolbar