Skip to content

Code snippets to remove the slug from custom post type URLs in WordPress.

Notifications You must be signed in to change notification settings

congtoan/remove-post-type-slug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Remove Post Type Slug

Code snippets to remove the slug from custom post type URLs in WordPress, making your URLs cleaner and more user-friendly.

Description

These code snippets help you remove the slug from custom post type URLs in WordPress. You can change quy_hoach to your desired custom post type name to remove its slug.

Usage

  1. Copy the Code:

    • Copy the code snippets from the functions.php file in this repository and paste them into your child theme's functions.php file.
  2. Replace Post Type Name:

    • Replace 'quy_hoach' with your desired custom post type name to remove its slug from the URLs.
  3. Save and Upload:

    • Save the changes and upload the functions.php file back to your child theme's directory.
  4. Verify:

    • Visit your website and check the URLs of your custom post types to ensure the slugs have been removed.

Contributing

Contributions are welcome! If you have any suggestions or improvements, please create a pull request or open an issue.

About

Code snippets to remove the slug from custom post type URLs in WordPress.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages