Skip Navigation

[Resolved] Create a Custom Post Template with no slug

This support ticket is created 3 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 3 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#2252435

Hello!
I need to create a custom template, archive page, taxonomies, fields, etc.
I need all the above things, but I don't want the "slug"

I know I can create a custom post type. But it adds a slug

is there any way to achieve this?

#2253267

Hello,

Toolset Types plugin is using WP built-in function to create custom post types, taxonomies and custom fields.

The slug settings are required by WordPress, you can check below documents:
https://developer.wordpress.org/reference/functions/register_post_type/#parameters
$post_type
(string) (Required) Post type key.

https://developer.wordpress.org/reference/functions/register_taxonomy/
$taxonomy
(string) (Required) Taxonomy key

https://developer.wordpress.org/reference/functions/add_post_meta/
$meta_key
(string) (Required) Metadata name.

And I don't think it is a good idea to use custom codes to remove/change the slugs settings, it might conduct other unexpected results.