Rather than using the
add_action( 'wp_head', 'wp_no_robots', 1 );
Try using
add_filter( 'wp_robots', 'wp_robots_no_robots' );
In your code you are actually trying to add one more function call to pre called function rather than just changing its value to noindex. Use add_filter instead. 🙂
Related Posts:
- Can YOAST SEO fields be removed from custom post type [duplicate]
- Should a SEO plugin be necessary? [closed]
- How are plugins in the WordPress plugin directory ranked?
- A plugin for having rel=”nofollow” in posts?
- How to add nofollow on all external links without plugin?
- WordPress web page struggling with performance
- add_filter the_content in functions.php not working
- XML sitemap over product variations
- Regenerate images with automatic ALT and TITLE attributes
- How to set a custom title per language?
- google conversion code
- qTranslate conflicts with SEO-plugins [closed]
- Yoast SEO plugin “could detect no serious SEO problems” on dashboard
- WordPress Sitemap including pages that aren’t there
- SEO Friendly URL on dynamic product page produced via shortcode
- install robots.txt to wordpress website admin
- Check if SEO plugin installed
- Show Sitename on Yoast SEO Title tag [closed]
- Help in using SEO Plugins: SEO Ultimate And Yoast SEO Plugin
- Yoast SEO settings unavailable in an archive page from wordpress plugin
- how to connect the author profile with google webmaster tools in multiuser blog?
- Yoast Force Rewrite Crashed Site [closed]
- Is changing post from category in a large blog a good practice?
- XML Sitemap Generator can’t notify google and bing
- Why is Google Search Console getting X-Robots-Tag noindex?
- How to integrate together a website currently hosted WordPress.com and a custom web application currently hosted on Azure?
- Site shows URL instead of “meta title” after deleted few plugins (not any SEO plugin was deleted)
- Plugin for TinyMCE to create reference to other posts
- Preserve Search engine index while shifting to new Domain
- How do I fill the Home Description?
- WordPress Sitemap for MSSQL
- custom wordpress theme and yoast seo injecting text in body
- WordPress built-in compression of images? How well does it compare to Photoshop or Shortpixel?
- Remove Keywords From Webpage But Still Use for SEO
- Does anyone know why my SEO and title become one?
- How page with random php file with query params generated
- My wordpress local urls is still displayed even moved to live
- Writing SEO for Homepage when homepage is set to display latest posts
- SEO Site Title appearing in google search despite not being added
- Facebook sharing image error with facebook debug
- Same Title on two different post type with single custom taxonomy
- Yoast Seo Plugin meta title not showoing [closed]
- How to markup wordpress site using Schema.org?
- Problem with Duplicate Meta / tag description in Webmaster Tool [duplicate]
- Does Google detect files in the WordPress plugin directory
- Strange Search Query Appearing on Google Index – “/?q=Save+Us+From+Berlusconi”
- Automatically set posts to NoIndex depending on category?
- Do shortcodes affect page indexing by search engines?
- getting image alt text via ACF plugin in WordPress [closed]
- How should I force WordPress to give proper name for the uploading images?
- Possible to change meta data single quotes to dobule quotes in yoast wordpress seo? [closed]
- Seo Problems in My meta Discription [closed]
- De-index plugin files
- how to make yoast seo read text from custom fields in custom post type
- Page with redirect
- Cannot install plugins even though www-data has write permissions
- How to call a plugin function from front end form
- adding a text message beside the comment submit button
- Hook into and send mail using WP Mail SMTP type plugin from HTML static front page?
- load_plugin_textdomain error
- Why am I getting ( WooCommerce Services could not be installed (Could not create directory.). ) error and how to solve it ?
- How can i get the post’s full html source by its ID?
- Redux Framework: Page freezes on typing in Editor
- How can I inject options into an select tag inside the widget form?
- WooCommerce : Direct Checkout Page [closed]
- Is there a rule for wordpress plugins developers to not do any database changes upon update?
- Looking for Gallery Plugin [closed]
- Notice: Undefined index: mtral_field_subscriber
- Delete free version plugin will also delete premium plugin
- How to delete a theme using AJAX
- Adding a responsive grid onto a page (without using a Bootstrap theme) [closed]
- Licensing a Plugin [closed]
- Add a function call after content automatically?
- Equivalent of admin.php for public pages
- Detect plugin/theme installation (via upload)
- Engadget Like Featured Breaking Plugin
- sliding/fading header plugin or approach suggestion
- Google Analytics event tracking code being stripped out of links in Author box – WordPress site
- Security of a WordPress Plugin
- @wordpress/scripts advanced usage
- wp_post not working, keeps redirecting to posts page
- How to display ACF coustom field from category on author.php
- How to add Mobile field in Registration form using Theme my login Plugin
- make p tag collapsed after 3 rows
- WPBakery Page Builder Shortcode Showing On Front Page For Post
- Comment restrictions Wodpress
- Gutenberg editor in WordPress 5.0.3 /wp-json/wp/v2/pages/4713/autosaves?_locale=user 500 (Internal Server Error)
- How to capture customer’s credit card details via PayPal on my checkout page?
- Add code to page template on page built with Visual Composer
- .htaccess file doesn’t work, with hundred tries
- plugin translation is not working
- A more elegant way to handle notices/warnings
- First argument is expected to be a valid callback for cp_admin_init and _canonical_charset
- Get the url of attachments from the post?
- WordPress User Frontend Editing Custom Fields
- What are the downsides of using bootstrap in plugin development?
- How ACF Advanced Custom Field works with Woocommerce Single Product [closed]
- Images get uploaded itself from the computer
- getPost() method and Pagination
- Private plugin updating – GitHub zip file changes the plugin directory (with release or branch name)