I'm trying to get category in my page url in WordPress, but I cannot get it to work correctly. I've tried to go to settings > permalinks and chose the custom structure and added these parameters: /%category%/%postname%/
, but the site url does not update. After adding the parameters and refreshing the page normally aswell as with a cache flush a page with a category assigned to it does not have the site url updated, the postname seems to function correctly though.
Currently there is only one plugin running on the website, Events Manager, other then that I'm running the latest WordPress version.
I added the category functionality in my functions.php file with the following code.
function myplugin_settings() {
// Add tag metabox to page
register_taxonomy_for_object_type('post_tag', 'page');
// Add category metabox to page
register_taxonomy_for_object_type('category', 'page');
}
// Add to the admin_init hook of your theme functions.php file
add_action( 'init', 'myplugin_settings' );
Can somebody please help me?
You can also manage taxonomies in the backend and build the url with the possible parameters.
However maybe just resaving your post will solve the problem.
Otherwise check this documentation from wp-beginner.