Remove Category base slug from URL in WordPress CMS

Published: Last Updated on 2K views 5 minutes read
A+A-
Reset

Hi,

Once again, I am back with trick which will be beneficial for bloggers. I suppose if you are a blogger, you must have used WordPress once. We hare previously covered few WordPress articles including some of below.

Custom WordPress Admin Style

CodeProject Feed Submission from WordPress

Remove Author Box in WordPress Blog

Using Google AdSense plugin with WordPress

Today, We will learn a trick that will make our website more SEO Friendly. Well this leads to a new word SEO which is actually not a new word in current scenario. Search Engine Optimization is a process of making your website search engine friendly so that you can maximize the reach via search engine and increase the performance of your website. A typical WordPress blog has options to choose from following permalink structure.

Remove Category Base Slug from from WordPress Blog

Permalink Setting – WordPress Admin

As you can see, We have set our website to create URL structure of Domain Name + Slash + Category Name + Slash + Postname + .html extension. You can customize whatever you want but by giving category in permalink your website pages are displayed in search engine as breadcrumbs. Lets make it clear with below screenshot.

Remove category base slug from WordPress blog

As seen in Google Search, Category is creating a structure

Remove Category base slug from WordPress

Search Engine listing Example 2

But with the Permalink structure as we defined in Screenshot 1 is like below.

[html]

https://pyarb.com/tag/wordpress

[/html]

Remove Category Base Slug from WordPress URL

Screenshot of URL with Base Slug

We see here Category also, but this is unwanted, we will love it it was without category, like below.

[html]

https://pyarb.com/tag/wordpress

[/html]

Now, All you have to do is need a help of plugin rather than messing with source code. I have mentioned earlier that it is also beneficial for better SEO.

Now, I assume, you have already installed SEO plugin. Plugins in WordPress are small to large piece of PHP code which can seamlessly work with WordPress and you need not to extra effort.

WordPress SEO by Yoast is one of the most used and most featured complete SEO management plugin for WordPress. We will take help of this plugin to get our job done. This plugin manages all kind of required META tags, Social META tags for Open Graph, Focus Keyword and like many features which do not require you to install or learn more complex SEO courses.

Now steps for Removing Base Category Slug from WordPress URL

Step 1: If earlier not installed, install WordPress SEO by Yoast plugin directly from WordPress plugin page or by downloading from above link and uploading. Then activate the plugin.

Step 2: You will see a SEO menu just below Settings menu in left panel of WordPress admin, hover on SEO and Choose Advanced. You can click on SEO to expand and then click on Advanced option too. Both are similar and open same page.

Advanced Menu of WordPress SEO by Yoast Plugin

SEO > Advanced Menu

Step 3: Click on Permalink tab of Advanced options page.

Remove category slug from WordPress URL

Remove category slug from WordPress URL

Step 4: Now enable check-box in first option that says “Strip the category base (usually /category/ ) from the category URL”  and Click on Save Changes button at the bottom of options page.

Save Changes

Enable check bopx and Save Changes

Great, you have done customizing. You have successfully completed all steps for remove category base slug from WordPress URL. Now lets have look at category links.

New link structure with category base slug

New link structure with category base slug

We will be back with lot more on WordPress and other topics, till then keep reading and provide feedback on out articles.

Related Posts

Leave a Reply

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.