Changing category base slug results in 404 errors on posts?
Changing category base slug results in 404 errors on posts?
Changing category base slug results in 404 errors on posts?
Date-based archive URLs to match my /2023/Jun/13 permalink structure?
Introducing sub categories into the URL
I’m having a similar problem. No matter what I do, I can’t get the custom taxonomies I create in ACF to be part of the custom post type’s permalink; it always remains /custom_post_type_slug/post_title
Have you already tried to flush permalinks? See https://www.wpbeginner.com/beginners-guide/how-to-regenerate-your-permalinks-in-wordpress/ Then I would start debugging the value of snek_results.ajaxurl
When I refresh the error page, it just refreshes. If the rule has been put in the correct place in the .htaccess file (ie. near the top of the file before the existing WordPress code block) then you shouldn’t be seeing an “error page” at all (if the redirect occurred correctly). (If you place this … Read more
There is a function called wp_unique_post_slug which is called whenever you save a post. This function contains a filter of the same name that you can use to modify the slug, depending on, for instance, the post type. This example will prepend the slug with the post type, so you can see from the slug … Read more
You could do something like the following, this should go in your Child Theme’s functions.php or if not using a Child Theme then add to a custom plugin: function hide_permalink_metabox( $is_post_edit_page ) { if ( !current_user_can(‘update_core’) ) { // allows Admins to edit the permalink echo ‘<style> div#edit-slug-box {display:none!important;} </style>’; } You may need to … Read more
Custom permalink for post of one category
I dont know how I missed out on that while looking for aproaches, but I have a working solution now based on this answer. I modified it to check for slashes in $query->request, if there is none I first look for my custom post type (get_posts() with’slug’ => $query->request). If no post is found I … Read more