You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting the value of a title field via insert_model_entry(), the post slug (post_name) is not set to use the slug-friendly unique version of the post title.
To reproduce
Create a model called 'rabbit' with a title field named 'testTitle'.
When setting the value of a title field via
insert_model_entry()
, the post slug (post_name
) is not set to use the slug-friendly unique version of the post title.To reproduce
wp post get [id-of-post]
post_name
value will be empty.Expected behavior
post_name
should be set to the unique slug-friendly version of the title, the same way it is if creating a post via the publisher admin.Version information
Workaround
post_name
can be set manually if needed:The text was updated successfully, but these errors were encountered: