Support

Account

Home Forums Backend Issues (wp-admin) Default values for existing posts

Solving

Default values for existing posts

  • Great plugin!!!!
    I was wondering if it is possible to set default values for a custom field after the posts are already created. Say I have 100 posts already created and I realize I need another field but most will be the same value, if I create a new field and assign it to those posts it looks as if the default value is not set until I open each post, select the default value and the click Update. Is there an easier way to do this? Is this a possible bug?

    Thanks!

  • Hi @whodeee

    Currently, this is not a bug, just a limitation of functionality which I have chosen in the past.

    I’ll rethink this and perhaps open up a discussion for a better way to use default values.

    For now, there is not much that can be done to automate the value, other than allowing for false in your front end code.

    Thanks
    E

  • Hi Elliot,
    Thanks for getting back to me. Yeah, being able to set a default value to already existing/published posts would be a great addition! Let me know if you get this added or when you open the discussion for it!

    Thanks again!

  • This would be very handy for queries. Now I have to create a script to run through and update / add to the post in order to be able to query for it.

  • @ralphioooo can you share your script? I hate having to go to each post and manually update it so the custom field registers to that post.

  • Hello i just did a test.
    I added a new sub field to my repeater.

    And i noticed the default value exists for all OLD posts even though i did nothing.
    I mean, not only on back end! which is expected.

    I am displaying this brand new field and the default value is displaying correctly on the front end for old posts.

    So i’m guessing at some point ACF changed since this is an ancient thread.
    Is it correct?

    Are you now applying new fields default values retroactively? If that’s the case AWESOME!

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Default values for existing posts’ is closed to new replies.