edit slug disappears when adding custom permalinks
-
Hi,
I just added custom post types to my wordpress install using
register_post_type( 'mycpt', 'rewrite' => false );
(I’ve cut out all the unnecessary code)Next thing I did was hacking the permalink structure to just have permalinks like https://example.com/%mycpt_id%/%post_name%/
So now I wrote those lines
https://pastebin.com/NauYHRhAbut now the field $post->post_name is empty due to wordpress does not seem to create slugs. also there is no more ability to edit the slug in the wp-admin by clicking on it. nevertheless the mycpt_id gets replaced.
thank you very much for your help.
sorry for maybe bad English.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘edit slug disappears when adding custom permalinks’ is closed to new replies.