Digital Photography Tips, Tutorials and Resources
Do you want to customize your permalinks? Having a good URL structure plays an important role in your search engine rankings. In this article, we will share how to customize permalinks in WordPress.
By default, WordPress allows you to customize the permalink structure for your entire website. You can simply go to Settings » Permalinks and pick a URL structure for your posts, pages, and other post types.
Having said that, every time you change the permalink structure, it will affect all of the pages and posts on your website. Sometimes, you may want to customize the permalink for one particular page, post, category or tag.
Lets take a look at a few options for customizing your permalinks.
Changing Slug for Pages and Posts
You may know that all pages and posts have a string of text that is generated automatically by WordPress when you add a new item. It is known as a post “slug”. In this example below, the slug is the part of the URL that reads, “my-photos”.
This slug is dependent on the permalink structure that you selected in the Permalink settings.
If you want to edit or change the slug for a single page or post, then you can do it by pressing the Edit button next to the URL on the Edit Post screen.
After editing the slug, make sure to update the post or page to save your changes.
Changing Slug for Categories and Tags
To change the slug for categories, you should go to Posts » Categories, and it will show all the categories.
Simply move your mouse to the category and it will show you the option of Quick Edit. Click on it and change the slug for the category.
Once you are done, make sure to click on the Update Category button.
Similarly, you can also change the slug for tags by going to Posts » Tags and editing the tags.
Customizing a Single Permalink
In the above examples, you changed the slug for individual posts, pages, categories or tags. However, the URL structure remained unchanged.
To completely customize the permalink structure for just one single URL, you’ll need to take help from a WordPress plugin.
First thing you need to do is go to Plugins » Add New. In the search bar, you should type Custom Permalinks and press the Enter key.
You need to click on the Install Now button to install the plugin.
In the next window, click on the Activate Plugin link to activate this plugin.
Upon activating the plugin, you can go to your Posts or Pages and edit any item to change the URL or permalink structure of a single page or post.
You can also go to Posts » Categories or Posts » Tags. Once you click on the Edit button, it will show you the custom permalink field.
You can repeat the same process for taxonomies.
Keep in mind, posts, pages, categories, tags and taxonomies that are ranking on search engines will need to be redirected to your new URL after you make the change. To learn more, check out this guide on creating redirects in WordPress.
Creating Unique Permalinks for Images
When you upload an image, WordPress automatically generates a URL for it. This URL will follow the standard permalink structure from your WordPress settings.
To create a unique URL for images in WordPress, you’ll need the Envira Gallery plugin.
Simply install and activate Envira Gallery. You need Envira’s Deeplinking Addon to create unique URLs for WordPress images. (To access this addon, you must have Envira’s Pro or Ultimate license.)
Go to Envira Gallery » Addons to install and activate the Deeplinking addon.
After activating the addon, you can go to Envira Gallery and edit the image gallery where you want to create unique permalinks for your images.
In the config settings, you need to check the box next to “Enable Deeplinking” to create unique URLs. To learn more, check out our guide on the importance of deeplinking and how to create unique URLs for images in WordPress.
We hope this article has helped you to learn how to customize permalinks in WordPress. You may also want to check out our guide on how to create a unique page URL for your WordPress gallery.