How to Disable UNICODE slug?

My solution using 3 combined hooks wp_insert_post_data, wp_ajax_sample-permalink,name_save_pre //==================DISABLE GEORGIAN + Russian SLUGS for POSTS================ //disable slug on any update add_filter(‘wp_insert_post_data’, ‘myappend_slug’, 3); function myappend_slug($data) { $data[‘post_name’]= slug_modify($data[‘post_name’]);return $data; } add_action( ‘wp_ajax_sample-permalink’, ‘MyajaxSamplePermalink’,1); function MyajaxSamplePermalink($data) { // check that we’re dealing with a product, and editing the slug $post_id = isset($_POST[‘post_id’]) ? intval($_POST[‘post_id’]) : 0; … Read more

How to print partial URL after #? [closed]

First off, the “slug” is what it is by definition. There is no such thing as a “front slug”. As you do not elaborate/know on how the anchors/hashes are generated on the server side, all I can give you is a JS solution (proof of concept): if (window.location.hash) { alert(window.location.hash.substring(1)); }

Bulk-change Post slugs which have a suffix

First thing I would backup and restore the site on a local development environment. Then you can try use this tool on your local site: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ Make sure that when you rename you are giving them something unique otherwise you may get in trouble.

Category Name and Slug field need to be the same otherwise it breaks category pages

I can’t comment yet, but I can answer – I think your problem may be that you’ve declared your $terms variable twice in your code, within your loop: <?php $terms = get_the_terms( $post->id, ‘knowledgebase_types’ ); ?> and <?php $terms = get_the_terms( $post->post_id, ‘knowledgebase_topics’ );?> Though some more information about what result you are actually seeing … Read more

Show post by slug sanitize_title

Except the title of the post is echo sanitize_title(news_get_meta(‘gamers’)); I’m assuming news_get_meta is a function particular to a theme or plugin you have installed, so your query should be: $query = new WP_Query( array( ‘post_type’ => ‘spa’, ‘name’ => sanitize_title( news_get_meta(‘gamers’) ); ) );

Make user’s first and last name as user slug

To update existing users, try to make a script file and put that code on it (you have to require necessary file wp-load.php if you put that file in the root of your wp instance) or by listning on a hook like init hook : $blogusers = get_users( ‘role=subscriber’ ); //get users by role // … Read more