How to Change Site Structure Using Category in WordPress
By Categories: Wordpress1.3 min read

In this tutorial, I’m going to show you how to use the custom category to change our site or content hierarchy.

As you can see on my dashboard, there are currently three posts. Each with at least one category.

Let’s try and open each of the categories.

Looking at the URL, there’s a category text in front of the term itself.
Instead of this default setup, I’m going to change or remove the category slug from the URL.

Go to Settings, then Permalinks. Scroll down until you see the “Category base” field. Add a period on this field. And save the changes.

Now, let’s visit the category URLs again.

It looks like we’re redirected to the 404 page.

Select Permalink Structure

To fix that, go back to the Permalinks settings. Select custom structure and add the category tag.

Hit save changes.

Open the category links again. Notice that there’s no category text anymore in the URL.

Now, let’s open this post with two categories assigned to it.

How do we select which category to use as slug in the URL?

Let’s find out. Let’s edit the post and select a category to be primary.

Select a Category To Be Primary

I don’t see any option yet so let’s install Yoast SEO plugin.

After this, let’s go back to the edit post screen and then hit refresh.

Now we can select the primary category for this blog post.

Update post. And then view post.

We successfully changed the term slug used in our post URL.