Remove custom permalink base from CPT custom category and custom tags

via: https://cnpagency.com/blog/the-right-way-to-do-wordpress-custom-taxonomy-rewrites/ I needed to change the order of registering the taxonomy (make sure it’s before CPT) and the CPT (make sure it’s after registering any taxonomy). Now ‘rewrite’ => array( ‘slug’ => ‘resources/tags’, ‘with_front’ => false ), works as expected!

WordPress Attachment Page URL Rewrite!

There are three issues in your code: In your custom wp_attachment_link() function, you should use the post slug ($attachment->post_name) instead of simply replacing the (whitespaces) with – (dash) in the post title — and note that the resulting slug could be different than the actual slug, e.g. the title could be My Image with the … Read more