Hello,
On my site a user registers and can create a new pet memorial.
The heading of the custom post is the field [pets-name ] which is what I want.
The post is saved pending review and then I have to approve and publish it.
I want the url of post to be /pets-name. This usually should work by default with wordpress as it is the Page title/
The problem is when the user saves the draft the slug becomes something very long like /cred-auto-draft-2742fe1aa2b2615d435f5931c871fb53-3 isntead of the Pet name.
How can this be fixed.
I also use the Yoast seo plugin.
Thanks,
Jacques
Hi Jacques,
Thank you for contacting us and I'd be happy to assist.
A simpler approach would be dropping a separate custom field 'pets-name' and using the WordPress post title for storing the pet's name too.
This way, the same name will be used as the post's slug too, like regular WordPress posts/pages.
Note: When a post is created through a front-end Toolset form and no page/post title is assigned to it, the automatically generated title is used ( in the format that you noted 'cred-auto-draft.....' ).
regards,
Waqar
Hi Waqar,
Thanks for your reply.
Sorry but I am not sure what I have to do.
Could you please tell me in more details how I can assign a custom field to be the wordpress post title?
In the end what I need to achieve is to let the user set the wordpress title via front-end form.
Thanks,
Jacques
Thanks for writing back.
> Could you please tell me in more details how I can assign a custom field to be the wordpress post title?
- My recommendation was actually not to use a custom field at all for the pet's name and only use the post title.
Here are the steps, that I'll recommend:
1. Please go to WP Admin -> Toolset -> Post Types and open the edit screen for the pet memorial custom post type.
2. Under 'Sections to display when editing', make sure that option for the 'Title' is checked.
3. In your form that adds a new pet memorial post, include the post title field, from under the 'Post Elements' section.
( example screenshot attached )
As a result, when users will use this title field for the name, it will be used for the post title as well as the URL/slug.
Thanks a lot Waqar,
I was looking for post title, I shoudle have looked for "Pet title" : )