How do I use the same Tag slug for different Tags?
How do I use the same Tag slug for different Tags?
How do I use the same Tag slug for different Tags?
Every archive is a posts archive, the main post archive being the homepage, if you want to move posts to a different URL, you can go to the readins settings and declare a page to be the posts page. Note that this page then acts as a placeholder purely for slug/URL purposes. You can’t change … Read more
Rewrite rule not working, but only when parameter is text
multisite 404 subfolder same name slug as site
Firstly it’s great to clean up your database, and doing this may make some queries faster. Bear in mind that the size of the data in this case is small and these postmeta keys may not be often used so there is little value in removing them, especially if you find you need them late: … Read more
Code snippet to add filter pre_post_link to change Media URL (post_type attachment permalink/slug)
How Can I Create a Friendly Slug for a Dynamic Page?
Try using the below code to overwrite arguments of already registered taxonomies. function wp_modify_taxonomy() { // get the arguments of the already-registered taxonomy $custom_category_args = get_taxonomy( ‘genre’ ); // make changes to the args $custom_category_args->rewrite[‘slug’] = ‘chambers’; $custom_category_args->rewrite[‘with_front’] = false; // re-register the taxonomy register_taxonomy( ‘genre’, ‘chambers’, (array) $custom_category_args ); } add_action( ‘init’, ‘wp_modify_taxonomy’, 11 … Read more
Thanks @Tom J Nowell for suggesting I post this fix as an answer! So the answer I found was that Yoast, a custom permalink plugin, and permalinks category bases were conflicting with each other on my site. Here’s what I did to fix it: Make sure your category base is specified in Permalinks. Save them. … Read more
Try to use function sanitize_title() – documentation, which converts a string into a slug when you check if it is already in the permalink, and when appending it to permalink: function custom_job_post_type_link( $post_id, $post ) { $permalink = $post->post_name; $companyname = $post->_company_name; if ( strpos( $permalink, sanitize_title($companyname) ) ) { // <– Here return; } … Read more