Categories: Internet

Remove Category base slug from URL in WordPress CMS

Published by

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.

As seen in Google Search, Category is creating a structure

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]

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.

Related Post

[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.

SEO > Advanced Menu

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

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.

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

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

Advertisement
Share
Published by

Recent Posts

Understanding Functions in C: Best Beginner’s Guide

In this blog, we'll explore the concept of Functions in C, their syntax, type of… Read More

Last modified 4 days ago

What is Queue in Data Structure and Algorithm, Concept of Queue in DSA Explained

First of all we have to understand what is queue? Queue in Data Structure and… Read More

Last modified 2 weeks ago

How To Change Bootstrap 5 Theme between Light and Dark Mode in any webpage using JavaScript & CSS?

In this article, we will learn how to add Dark and Light Mode switching functionality… Read More

Last modified 3 weeks ago