• Resolved Windurin

    (@windurin)


    Hi. Why was the ACF field option removed for the title? Setting the default title as post title, the Title Label refuses to change and still doesn’t work anyway. I see an option in the backend of ACF that allows you to set a custom field as the post title which I assume is an option added by this plugin, but although it saves the title, it doesn’t save that title as the slug, it’s saving a random post number, e.g. example.com/27583

    Am I missing something?

Viewing 15 replies - 1 through 15 (of 18 total)
  • Thread Starter Windurin

    (@windurin)

    The Title Label not changing was a visual bug, had to delete and re-add the widget to get it to work properly. Also, after updating, all the post labels disappeared and you have to disable and re-enable the Post Labels option in the widget to get them to show.

    But the major issue of the custom post type slugs remains. After updating, the post title field is blank because the custom ACF option is gone. As I mentioned, setting it to None/Custom and enabling ‘Set as Post Title’ on a custom field in the ACF field group options saves the title correctly but the slug is saving as a post ID/number. On the Edit forms for the same post type, the title and slug do update correctly so it’s only when adding New custom post types.

    I know there’s the option to use the default title and rename it which would be helpful but that option isn’t saving either a title or a slug at all. Maybe there’s conflicts with other plugins but for now I’ve had to revert back to version 2.3.6

    Plugin Author Shabti Kaplan

    (@shabti)

    Hello @windurin. I hope all is well. I meant to put out a video tutorial about the new way of replacing the default title field, but it got delayed, unfortunately.

    I apologize for the complications this caused you. Unfortunately, there were some bugs that passed testing, which is why the new way to add a custom ACF field didn’t work.

    Thread Starter Windurin

    (@windurin)

    Hi Shabti. But what I’m saying is I can’t get it to work, even with the latest update. So can you explain the process here please? If you want to use a custom field as the title, I assume you enable the ‘Set as Post Title’ option for that field, then choose None/Custom in the ACF form widget. That’s what I’ve tried but why then is it saving new custom post type slugs as IDs and not the post name? It’s nothing to do with the permalinks settings because editing and updating the post does then save the slug correctly, but a NEW post saves it as an ID/number.

    Plugin Author Shabti Kaplan

    (@shabti)

    @windurin it turns out that this wasnt updated. But I just pushed up another update that takes care of this

    @shabti

    FYI, the readme.txt file still says:
    Stable tag: 2.3.15

    Plugin Author Shabti Kaplan

    (@shabti)

    Thanks πŸ™‚ Ill change it

    Were you able to update?

    @shabti

    Yeah, I’ve updated the plugin but won’t have a chance to play around until later on this evening. I’ll report back once I have tested πŸ™‚

    Thread Starter Windurin

    (@windurin)

    Hi Shabti. Thanks, it’s working now after that latest update. I thought I was going crazy and I would have to disable a load of plugins to find a conflict ha.

    Thanks for updating it so quick.

    @shabti / @windurin

    I’ve tried setting the post title via c custom field as well as the form… in both scenarios the slug has the post_id rather than it’s title. Is there an extra step or something involved?

    Plugin Author Shabti Kaplan

    (@shabti)

    @hshah is this happening on the “new post” action?

    In the “edit post” action, the slug should remain the same, although we are going to add an option to let you change the slug when updating.

    @shabti

    Yes, it is when:
    Main Action = New Post

    I believe it is what @windurin mentioned yesterday.

    I will try recreating the widget and see if that helps in any way πŸ™‚

    Thread Starter Windurin

    (@windurin)

    @hshah That is the problem I was having with 2.3.15, but 2.3.16 fixed it. I did have to re-add and set up the form though. I assume you also have ‘Set as Post Title’ enabled on a certain text field in ACF?

    @windurin

    I’ve recreated it a few times but don’t seem to be having much luck. I wouldn’t be surprised if I am doing something silly here though, so I’ll quickly run through what I have set up.

    ACF Field Group
    # Title (Text Field, Required, Frontend Only, Set as Post Title)
    # Description (Text Area, Required, Frontend Only, Set as Post Content)
    # Attachments (Gallery, Required)

    ACF Form:
    # Action = New Post
    # Fields = Field Groups (selected the group detailed above)
    # Post Fields = All set to None/Custom

    I have set it to redirect to new post URL, so when I save the form, it takes me to:
    https://website.co.uk/photos/11331-2/?updated=5c8e336_11312

    I’ve just noticed that if I try to edit the post from the admin backend, the URL is:
    https://website.co.uk/wp-admin/post.php?post=11331&action=edit

    Every single test post I have tried to create has the slug as:
    postid-2

    If I try and access the post using:
    https://website.co.uk/photos/11331/

    It just goes to:
    https://website.co.uk/photos/11331-2/

    Thread Starter Windurin

    (@windurin)

    Are you definitely using 2.3.16 (or even 2.3.17 now) and not 2.3.15? Because your setup is exactly the same as mine and it started working from 2.3.16 onwards.

    Plugin Author Shabti Kaplan

    (@shabti)

    @hshah that’s really strange bahavior.

    Could it be a permalinks issue? Was this working the way you want before 2.3.15?

Viewing 15 replies - 1 through 15 (of 18 total)

The topic ‘Post Title Not Saving Correct Slug’ is closed to new replies.