Articles of slug

How to remove the category from post slug

I want to remove the category from post slug, for example a post slug like “” would become “”. My search only gives results about how to remove the word “category” from slugs, which is a different problem.

Getting the slug into a variable, how to echo that variable

The page slug for each of our wordpress articles is a unique set of seven digits, and we are using that string of numbers as the page slug. In trying to learn how to customize our site even further, I’d like to learn how to echo that slug in template files (outside the loop – […]

Custom Slug for a custom post type and default post

It’s now several hours that I am trying to get this done without finding a proper solution. WHAT I WANT TO ACHIEVE I’d like WP to use the following URL structure: 1) Posts -> /%category%/articles/%postname%/ 2) CPT -> /%category%/CPT/%postname%/ Where the %category% bit is the default categories taxonomy used in the Posts WHAT I DID […]

Unwanted slug in my website

There is an unwanted slug /question/ in my WordPress website. Slugs are automatically changed to /question/ when I open many pages. I have thoroughly checked my phpMyAdmin and I have no /question/ slug on my website. My .htaccess also have nothing other than standard piece of code. Though I have a custom post type /questions/ […]

Bulk update post slugs through database

Is there a way to bulk update permalinks through the database? cause I have like 20k posts and all I want to do is add a prefix to the permalink. I could just manually update but that’s too tiresome for 20k posts. For example if post url is I want to change it to […]

taxonomy/category term in URL slug irrelevant for post?

so I’ve got a nice hierarchical system working involving custom post types and taxonomies. (see Custom post types, taxonomies, and permalinks for reference) So if I have a post with , it works, and I can access taxonomy pages in etc etc However, noticed a bug – I can put ANYTHING as part […]

wp_update_term not creating new unique slug

I want the slug to be recreated every time the term name is updated so it accurately reflects the name. wp_update_term(10, ‘artists’, array(‘name’ => ‘my new name’)); The documentation for wp_update_term says: If the ‘slug’ argument in $args is missing, then the ‘name’ in $args will be used. It should also be noted that if […]

Can't remove slug in url

I need remove slug movie from I’ve tried remove ‘slug’ => ‘movie’, ‘with_front’ => FALSE,), from code, but this don’t help’s me. Here a code <?php /* Movies post type*/ function post_type_movies() { register_post_type( ‘movies’, array( ‘public’ => true, ‘publicly_queryable’ => true, ‘has_archive’ => true, ‘hierarchical’ => false, ‘menu_icon’ => get_stylesheet_directory_uri() . ‘/images/movie.png’, ‘labels’=>array( […]

Change Slug of a Custom Post Type

I use a plugin that creates a custom post type with a slug that I am wanting to change. I don’t want to overwrite the plugin files, so I’m wondering how I can change the slug using a separate function? Thanks. // Register post type add_action( ‘init’, ‘ctc_register_post_type_item’ ); function ctc_register_post_type_item() { // Arguments $args […]

How to use a specific custom field in a custom post type as slug

I’d like use a specific custom field in a custom post type as the slug for the post. My custom post type is members and the custom field that I want to use as the slug is member_user. How can I do this?