Posted on Leave a comment

How to Remove meta name=”robots” content=”noindex nofollow” in WordPress Function

Are you facing issues with your WordPress site where search engines aren’t indexing your pages due to the presence of <meta name=”robots” content=”noindex nofollow”? This can be a frustrating roadblock for website owners who want their content to be discoverable through search engines. Fortunately, there’s a simple solution to this problem, and AndamanTech is here to guide you through it.

How to Remove meta name robots noindex nofollow WordPress Function

While the internet may offer various solutions, some of which might be complex or unreliable, we provide you with a straightforward method to remove the noindex nofollow directive from all your pages in just a few lines of code added to your WordPress theme’s functions.php file.

I have previously mentioned in another blog post about how to remove the WordPress Robots Meta Tag noindex. You can refer to that blog post for updated information.

However, although the function described in that blog post works, there may still be instances where the noindex tag appears or does not change, particularly on search pages. Therefore, to ensure complete removal, you may need to remove the <meta name=”robots” content=”noindex nofollow”> tag from all pages, posts, categories, author pages, etc.

Here’s How to Remove Meta Name=”Robots” Content=”Noindex Nofollow” in WordPress:

  1. Log in to your WordPress Admin Panel: Access your WordPress dashboard by entering your credentials.
  2. Navigate to Appearance: Once logged in, go to the “Appearance” section. You’ll find it on the left-hand side of your dashboard menu.
  3. Access Theme File Editor: Under “Appearance,” locate and click on “Theme File Editor.” This will open the editor where you can make changes to your theme’s files.
  4. Acknowledge Understanding: Before proceeding, ensure that you understand the potential implications of modifying theme files directly. Click on any prompts that ask for confirmation.
  5. Open Theme Functions (functions.php) file: In the Theme File Editor, search for and select the “Theme Functions (functions.php)” file. This file contains the functions that define your theme’s behavior.
  6. Add Code to Remove Noindex Nofollow Directive: Now, you can add the following code snippet to the bottom of your functions.php file:
add_filter( 'wp_robots', function( $robots ) {
	$robots['noindex'] = false;

	return $robots;
} );

This code snippet effectively removes the noindex nofollow directive and replaces it with index, follow, allowing search engines to crawl and index your pages as intended ?s={search_term_string}.

Important Note: Always make sure to back up your functions.php file before making any modifications. This ensures that you can revert to a previous version if needed.

By following these steps and implementing the provided code snippet, you can effectively remove the <meta name=”robots” content=”noindex nofollow” directive from your WordPress site, allowing search engines to properly index your content and improve your site’s visibility in search results.

With AndamanTech simple solution, you can ensure that your valuable content reaches a wider audience and achieves its intended impact. Say goodbye to indexing issues and hello to enhanced discoverability for your WordPress website!

Posted on Leave a comment

How to Remove /category/ from WordPress URLs

How to Remove category from WordPress URLs 2023

As a WordPress developer, you may have encountered the challenge of removing the “/category/” base from your website’s URLs. While this might seem like a daunting task, it can be accomplished with a few simple steps. In this article, we’ll guide you through the process, ensuring that your WordPress website’s URLs appear just the way you want them.

Why Remove /category/ from URLs?

WordPress categorizes posts into different categories, which is a useful feature for organizing content. However, the default URL structure includes “/category/” before the category name, making URLs longer and less user-friendly. By removing “/category/” from your URLs, you can create cleaner, more aesthetically pleasing links.


Before you start, there are a couple of prerequisites to keep in mind:

  1. Ensure that your web hosting server supports PHP version 8.0 or above. If not, you may need to upgrade your hosting plan or server to meet this requirement. This is essential because the method we’ll use to remove “/category/” relies on PHP functions introduced in newer versions.
  2. Make sure you have access to your WordPress admin dashboard, as you’ll need it to modify the Permalinks settings and theme files.

Step 1: Adjust Permalinks Settings

The first step in removing “/category/” from your WordPress URLs involves tweaking the Permalinks settings. Follow these steps:

  • Log in to your WordPress admin dashboard.
  • On the right-hand side menu, navigate to “Settings” and click on “Permalinks.”
  • In the Permalinks page, find the “Category base” field. By default, it’s set to “/category/.”
  • Replace “/category/” with your preferred base, or simply leave it blank for the best results. A common choice is to use a single character like a hyphen or a period (e.g., “-“). This will create cleaner, more user-friendly URLs.

Step 2: Edit Your Theme’s functions.php

The second step involves editing your theme’s functions.php file to ensure that the changes you made to the Permalinks settings take effect. Here’s what you need to do:

  • In your WordPress admin dashboard, go to “Appearance” and click on “Theme Editor.”
  • In the Theme Editor, select the “functions.php” file on the right-hand side.
  • Add the following code to the end of the functions.php file:
function remove_remane_category( $string, $type )  {
if ( $type != 'single' && $type == 'category' && ( strpos( $string, 'category' ) !== false ) )          {
$url_without_category = str_replace( "/category/", "/", $string ); 
return trailingslashit( $url_without_category );          
return $string; 
add_filter( 'user_trailingslashit', 'remove_remane_category', 100, 2);

Save the changes.

Final Thoughts

By following these two simple steps, you can successfully remove “/category/” from your WordPress website’s URLs. This not only makes your links look cleaner but also enhances the user experience. Remember that changing your category base also allows you to customize your URLs further.

Keep in mind that altering your website’s core settings and theme files may carry some risks. Always make a backup of your website and its files before making any changes. This way, you can restore your website if something goes wrong.

With the right PHP version and these easy steps, you can improve your WordPress website’s URL structure and create a more polished user experience for your visitors. Happy customizing also read WordPress get author Biographical Info or author description! and GeneratePress Show Related Articles without Plugin

Posted on Leave a comment

How to Remove WordPress Robots Meta Tag noindex Updated

How to Remove WordPress Robots Meta Tag noindex Updated

WordPress is a dynamic platform that evolves with each update, making it essential for website owners and developers to stay current with best practices. One important aspect of optimizing your WordPress website for search engines is managing the Robots Meta Tag. This tag instructs search engine crawlers on how to index your site’s pages. To ensure your website is always up-to-date and functioning correctly, it’s important to use the latest techniques. In this article, we’ll guide you through the process of removing the noindex directive from your WordPress site’s Robots Meta Tag and show you the most current methods.

Step 1: Removing the Robots Meta Tag from WordPress

The first step is to remove the noindex directive from the Robots Meta Tag. This tag is often used to prevent search engines from indexing specific pages or entire websites. Here’s how you can do it:

  1. Log in to your WordPress admin dashboard.
  2. Navigate to your theme’s functions.php file. You can find it under “Appearance” -> “Theme Editor” in the WordPress dashboard.
  3. In the functions.php file, scroll to the bottom to ensure that your code does not interfere with existing functions or features. It’s best practice to create a child theme if you’re not already using one.
  4. Add the following code to remove the noindex directive from the Robots Meta Tag:
remove_filter('wp_robots', 'wp_robots_max_image_preview_large');

This code will override the default noindex directive and instruct search engines to follow and index your pages. Make sure to save the changes.

Step 2: Adding the Robots Meta Tag Manually

Once you’ve removed the noindex directive using the code mentioned earlier, you might also consider including a customized Robots Meta Tag on particular pages or posts. This will grant you more precise control over how search engines handle the indexing of your content.

To implement this, access the WordPress theme folder and locate the header.php file. Open this file and place the following code snippet right after the <meta charset="<?php bloginfo( 'charset' ); ?>"> line:

Find the <head> section within the HTML code.

Within the <head> section, insert the following code snippet:

<meta name="robots" content="follow, index, max-snippet:-1, max-video-preview:-1, max-image-preview:large"/>

This code imparts the same directives as described in the preceding step, ensuring that search engines appropriately follow and index the content specific to this page.


Optimizing your WordPress website for search engines is an ongoing process, and managing the Robots Meta Tag is an essential part of it. By using the latest techniques and WordPress hooks, you can effectively remove the noindex directive and control how search engines index your site. Remember to regularly check for updates in WordPress and keep your theme and plugins up to date to ensure that your code works seamlessly. With these steps, you’ll have greater control over how your WordPress website appears in search engine results pages, ultimately improving its visibility and discoverability.

Posted on Leave a comment

What are meta tags? How to Add meta tags in WordPress?

How to Add meta tags in WordPress

Do you ever wonder why you’ve chosen to read this particular article? Well, we have the answer! – You’re here because we’ve skillfully incorporated meta tags into this blog. This strategic move ensured its accessibility when you entered your query into the search bar, or perhaps you simply enjoy perusing our content.

Today, we’ll take a deep dive into the world of meta tags, exploring what they are, how to add them properly in WordPress, and the benefits they bring to your website.

If you find yourself in need of assistance with your WordPress website, don’t hesitate to reach out to AndamanTech, the WordPress website support services. We can assist you in setting up your website efficiently and affordably.

What Are Meta Tags?

Meta tags are concise snippets of HTML code that help search engines understand the content of your webpage. Correctly adding meta tags in WordPress ensures that search engines present your page effectively. Neglecting this step might result in your page getting lost in the sea of other websites.

Adding meta tags to a WordPress site is one of the most critical SEO techniques. To view the meta tags of a page, simply press Ctrl+U.

What Is a Meta Tag Example?

Today, we aim to introduce you to the six primary types of meta tags that can optimize your website to the fullest:

  • Title Meta Tag: Title tags are the most commonly used meta tags on web pages, and they are the first things visible to search engines and users. Titles should be concise, clear, and contain the primary keyword. The title tag format is: <title>Meta tag example</title>.
  • Description Meta Tag: The description meta tag provides a brief, clear description of the page’s content, displayed just below the title meta tag. The description meta tag format is: <meta name="description" content="Your description here">.
  • .=Keyword Meta Tag: Keyword meta tags consist of top keywords that accurately describe your content. To find the keywords on a page, press Ctrl+U and search for the line beginning with <meta name="keywords">.
  • Alternative Text for Images: Alt tags are written for images, allowing search engines to index them. They ensure that users can understand the image, even if it doesn’t load. Alt tag format is: <img src="your-image.jpg" alt="Your alt text">
  • Canonical Meta Tag: Use the Canonical tag for similar pages to indicate the main one, preventing duplicate content issues. The Canonical tag format is: <link rel="canonical" href="your-canonical-url">
Meta tags are concise snippets

How Meta Tags Improve WordPress SEO

Meta tags have a significant impact on your page’s SEO. If they were irrelevant, Google wouldn’t recommend manually writing headings, titles, and meta tags to enhance your site’s search engine optimization.

WordPress offers numerous features, but it’s essential not to overload your site with excessive plugins. Adding meta tags is crucial as it expedites your appearance in Search Engine Results Pages (SERPs).

How to Add Description and Keyword Meta Tags

You can add description and keyword meta tags in two primary ways:

  1. Use Yoast SEO Plugin: Install the Yoast SEO plugin, enter keywords, and descriptions for your pages.
  2. Add Meta Tags Manually: Open header.php via File Manager or SFTP, find the <head> tag, and add meta tags like <meta name="keywords" content="your keywords"/> and <meta name="description" content="your meta description".

How to Add Alternative Text for Meta Tags

To add alternative text to an image, use a suitable plugin, describe the image, and add it to your site during publication.

How to Add the Canonical Meta Tag

There are two main methods to add a Canonical meta tag to your site:

  1. Yoast Plugin: Use the Yoast plugin.
  2. RankMath: Alternatively, you can use RankMath.

Top 7 Tips for Creating Effective Meta Tags

  • Don’t overstuff your page with metadata.
  • Choose clear and relevant keywords.
  • Keep metadata concise.
  • Use unique meta tags for each page.
  • Incorporate keywords into your meta tags.
  • Avoid passive voice.
  • Make each tag unique.

In Conclusion

Adding meta tags to your WordPress website is paramount for your site’s success. Meta tags are essential for optimizing your site’s SEO. We hope you found our blog helpful in this regard.