Divi: the easiest WordPress theme to use
Divi: The best WordPress theme of all time!
With over 901.000 downloads, Divi is the most popular WordPress theme in the world. It is complete, easy to use and comes with more than 62 free templates. [Recommended]
Recently, one of our readers asked us if it was possible to change the permalink structure of a custom post format. By default, you can change the permalink structure for WordPress posts, but not for custom post formats. In this tutorial, we'll show you how to change the permalink structure of a custom post format in WordPress.
Why permalink structure of a custom publication format?
WordPress uses a URL structure suitable for SEO to optimize the SEO of your articles. These "SEO friendly URLs" are called permalinks.
You can customize the permalinks by accessing the page " Settings> Permalinks ". However, you will notice that you can only change the permalink structure for the blog.
If you use custom post formats or taxonomies on your website, then WordPress will use the default permalink structure for these.
For example, if you have a custom post format "Movies", its URL structure will look like this:
If your custom post type allows archives, the archive URL will look like this:
This URL scheme is quite " SEO friendly And in most cases, you will not need to change that. However, sometimes you can customize it to suit your own needs.
That said, let's see how you can easily customize the permalink structure of custom publishing formats on WordPress.
Easily create your website with Elementor
Elementor allows you to easily create any website design with a professional look. Stop paying expensive for what you can do yourself. [Free]
How to modify the permalink structure of custom publishing formats
After activating the plugin, you must visit the following location " Settings> Permalink "Then scroll to" Permalink Settings Custom Post Types ».
Here you can change the permalink structure of the simple elements of your custom publication formats.
You can use all of the basic WordPress structures. Suppose you want to use ID instead of the article name in the URL. In this case, all you need to do is add this tag:
/%% Post_id /
Notice the slashes at the start and end of the label. These slashes are separators, and without them your permalinks won't work.
Do not forget to click on the button « Save Changes To save your settings.
Now, permalinks for a single element of a custom publication format will look like this:
The number in the URL will be the numeric identifier of an item in your WordPress database.
Let's take a look at another example.
Let's say you want to add / year / before the article name in the URL. In this case, you will use this tag:
/% Year% /%% POST_NAME /
Click the "Save Changes" button to update your permalinks.
Now, the permalink of an element of a custom publication format will look like this:
So far, so good. Now we will try another example.
Suppose you are using a custom taxonomy called "genre" by "movies" for your custom post type, and you want to add the custom taxonomy in the URL. In this case, you will use this tag:
/ Gender%% /%% POST_NAME /
In this example, " gender Is the slug of our custom publishing format.
Click the " Save Changes To update your permalinks.
Now the only post permalink for your custom post format will look like this:
That's it for this tutorial. I hope it will allow you to modify the permalink structure of custom publication formats.