-
AuthorPosts
-
January 3, 2020 at 1:24 pm #1169287
Hi,
i set some pages to noindex with another plugin (rank math). It works finde for google.
Problem is, that for bing.com (search engine) it does not seem to work. I checked source code and found:
<meta name=”robots” content=”index, follow” />
<!– mobile setting –>
<meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1″>
<!– Scripts/CSS and wp_head hook –>
<!– Suchmaschinenoptimierung von Rank Math – https://s.rankmath.com/home –>
<title>Kontakt – My website</title><meta name=”robots” content=”follow,noindex,noarchive,nosnippet”/>
It seems bing.com is fetching the first meta-name “index, follow” and ignores second (set with rank math plugin) “follow,noindex,noarchive,nosnippet”.
How can i remove the first meta name, given from enfold?
Many thanks & kind regards Jak
January 3, 2020 at 1:56 pm #1169298Hi,
Please add following code to bottom of Functions.php file in Appearance > Editor to set it to nofollow, noindex
add_filter('avf_set_follow','av_set_nofollow'); function av_set_nofollow(){ $meta = '<meta name="robots" content="noindex, nofollow" />' . "\n"; return $meta; }
and use following to delete it
add_filter('avf_set_follow','av_set_nofollow'); function av_set_nofollow(){ $meta = false; return $meta; }
Cheers!
Yigit- This reply was modified 4 years, 10 months ago by Yigit.
January 3, 2020 at 2:28 pm #1169313Hi Yigit,
thanks for your fast reply!
I only want to block some pages from bing, not all.
I’m using rank math seo plugin.The thing is, that the enfold theme ads: <meta name=”robots” content=”index, follow” /> by itself.
Rank math is confugured correctly.
I would like to remove: <meta name=”robots” content=”index, follow” /> from the enfold theme only, so that rank math plugin can work by itself.How can i do that?
Kind regards Jak
January 3, 2020 at 2:34 pm #1169318Hey Jak,
Second code i posted above should only remove Enfold’s meta on all pages so after inserting the code, your source code should look like following
<!– mobile setting –> <meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1″> <!– Scripts/CSS and wp_head hook –> <!– Suchmaschinenoptimierung von Rank Math – https://s.rankmath.com/home –> <title>Kontakt – My website</title> <meta name=”robots” content=”follow,noindex,noarchive,nosnippet”/>
Does it not give expected results? :)
Best regards,
YigitJanuary 3, 2020 at 10:36 pm #1170130Hi Yigit,
so i should only use second code?
kind regards Jak
January 4, 2020 at 1:35 am #1170163Hi,
Yes, please only use this code
add_filter('avf_set_follow','av_set_nofollow'); function av_set_nofollow(){ $meta = false; return $meta; }
Best regards,
YigitJanuary 4, 2020 at 3:16 pm #1170288Hi Yigit,
after i added this code, rank math is not visible in my dashboard pages?
It dissappeared after adding the code in pages-dashboard?Any idea?
kind regards Jak
January 6, 2020 at 5:17 am #1170622Hi Jak,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( to be sure that we have enough time to debug ). - Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create an admin user and post the login credentials in the “private data” field.Best regards,
NikkoMay 27, 2020 at 12:22 pm #1216909Hi,
I still have the problem, please help. I updated Enfold theme. It seems the code I added is missing now.
Should I add the code again?
Kind regards
Jak- This reply was modified 4 years, 6 months ago by Jak73.
May 27, 2020 at 1:29 pm #1216927Hi Jak,
Yes, please do add the code to functions.php file once again.
We would recommend you to use a child theme – https://kriesi.at/documentation/enfold/child-theme/ and add the code to functions.php file of your child theme so you would not need to add the code after each update :)
Best regards,
Yigit -
AuthorPosts
- You must be logged in to reply to this topic.