As long as haven’t touched the slug WordPress will generate a new one after you entered a title.
Update
To change other peoples slugs use a filter (not tested!):
add_filter( 'wp_insert_post_data', 'prevent_numeric_slugs', 10, 1 );
function prevent_numeric_slugs( $post_data )
{
if ( ! isset ( $post_data['post_title'] )
or ! is_numeric( $post_data['post_name'] )
)
{ // exit early
return $post_data;
}
// post_name is the slug
$post_data['post_name'] = sanitize_title( $post_data['post_title'] );
return $post_data;
}
Related Posts:
- How to get a taxonomy term name by the slug?
- Is there a maximum slug length?
- How to check if a slug exists?
- Can I use a number for a post/page slug?
- add action only on post publish – not update
- Force post slug to be auto generated from title on save
- Prevent WordPress from abbreviating-long-slugs…-in-the-admin
- How to rewrite slug of custom post type archive page
- How to get full slug, including all parent pages
- How to add a “publish” link to the quick actions
- Remove Slug from Custom Post Type
- How to show an error message after publishing a post?
- Add warning to edit slug/permalink button on editor screen.
- Publish post when edit post form submitted with enter/return pressed on keyboard
- How to prevent duplicate slugs for wp_insert_post?
- How to remove certain words from url slug
- How to generate slugs?
- wp_login action hook not working
- How to display and use all existing tags at my write-post-at-frontend-panel?
- {Check Theme Plugin} text domain does not match the theme’s slug
- Possible to create a new post and have the Title and Slug automatically use the post’s ID?
- How to add a checkbox inside the “Publish post” widget?
- Display page over category archive
- Convert post name into post ID
- WP appending -2 to the end of my slug. Where are the originals stored so I can delete them?
- Yoast SEO breadcrumbs: how to create a filter that uses the url slug for breadcrumb titles
- Function to list all post slugs for every post in my WP database?
- Action on post publish
- Add parent template name to body class filter when visiting subpage or single post
- Set taxonomy slug as taxonomy title
- custom slug always ends in “-2”
- Show all wp_get_post_terms slugs
- Hook on slug generator
- Do post_names have to be unique?
- How to run a function when post is edited or updated using publish post action?
- Disable “preview changes” button
- slug: should I use latin characters only?
- How to manage same slug posts suffix method?
- Make wp_list_pages print slugs instead of titles
- Stripping unicode characters out of slug
- Remove slugs of old and unused custom post type
- What function removes apostrophes when making a slug?
- WordPress not adding -2 to slugs when saving post as draft
- publish_post action hook not working
- Custom post type suppress transition from future to publish
- Memberpress custom fields – filtering content
- Duplicate category slugs from pages and posts
- Set meta field to publish date + 2 weeks
- How to show “slug” in admin column?
- Change post slug but keep old one
- Why does post-slug not get saved for drafts?
- Copy post to separate database with “add_action(….)”
- Remove custom post slug and add category to custom post type
- ‘wp’ hook supposed to trigger when editing a post?
- WordPress Reserved Terms, any workaround?
- I would like to send a notification email (Asana) whenever something is published (posts, pages, custom post types) [duplicate]
- Slug Taken, Cant Find Which Page
- Suddenly new posts have the default permalink instead of the post name
- add_action hook for publish_post not working
- How to get a page slug in WordPress?
- A way to export slug as meta tag
- Adding language based URL structure
- Display Terms Comma separated and Hyperlinked
- Is it possible to create slug on homepage and how?
- what to do when a Theme uses a custom post type slug that conflicts with a plugin?
- Wrong slug on blog page
- Can’t remove slug in url
- How can I get the user that publishes a post?
- What is the action or filter for adding information under the Permalink in Edit Post/Page?
- Set a custom post type’s title and slug to match the current date
- One Page or Post, n Slugs
- add slug of child(ren) to li using wp_list_pages
- Category Slugs = 404s?
- How to prevent post_name from incrementing in wp_insert_post?
- How can I get wordpress slug without certain phrase? [closed]
- Check for the existence of term slug
- How to ignore GET parameter that’s the same as a CPT slug?
- Make user’s first and last name as user slug
- Default post category overruling %category% setting for posts URL
- 404 errors problem with multilangual permalink pages
- Show post by slug sanitize_title
- Category Name and Slug field need to be the same otherwise it breaks category pages
- Get all terms/slugs – used, not used & in hierarchical order
- Bulk-change Post slugs which have a suffix
- How to print partial URL after #? [closed]
- How to Disable UNICODE slug?
- How to update permalink on the fly?
- list child pages as slug
- Plugin that generates a page of post content
- can’t change page slug
- Action while post is being published
- How to put title slug into content when create a new post?
- WordPress v3.1 Has Character Encoding Issue With Title/Permalink?
- Ultimate get current page’s slug function
- How To Change Username Slug
- Use add_action to run a script, but only on the post editor page
- How can I make “sanitize_title” affect only one taxonomy?
- How to create extra SUB ARCHIVE for each page?
- Slug is already taken – how do I find the original item
- Duplicate Slugs on multilingual site (with Polylang)