Display page over category archive

Option #1 Add a theme file for each category, instead of adding a Page for each category. You would create a file called category-news.php which would only display for the news category at /news/, plus files for each other category, such as category-other.php which would display for the other category at /other/. Then just place … Read more

How to generate slugs?

As @toscho already answered here, yes this is possible. You just need to copy this code into the functions.php of your theme, and there you go. // get all posts $posts = get_posts( array ( ‘numberposts’ => -1 ) ); foreach ( $posts as $post ) { // check the slug and run an update … Read more

How to remove certain words from url slug

There should be no problem with unset. There is your answer. What matters with a filter is what you return and unseting those keys before your rebuild the string and return it, works. You are doing too much processing by explodeing your $keys_false inside a loop, and you have a typo, and you are better … Read more

Add warning to edit slug/permalink button on editor screen.

WordPress has already hooked jQuery events to that button which you could omit with off() method, or keep things simple and add an overlay above that button and act as the button, prompting users to confirm the editing action at first place: jQuery(document).ready(function($){ var c = $(‘#edit-slug-buttons’) , b = $(‘button’,c).first(); c.css({ position: ‘relative’ }).append(‘<span … Read more

Remove Slug from Custom Post Type

There is a simpler and lighter solution: First: set the slug argument for your custom post type to “https://wordpress.stackexchange.com/” when registering the post type: add_action( ‘init’, ‘register_my_post_type’ ); function register_my_post_type() { $args = array( //The rest of arguments you are currently using goes here ‘rewrite’ => array( ‘slug’ => “https://wordpress.stackexchange.com/” ) ); register_post_type( ‘my-post-type’, $args … Read more