Support

Account

Home Forums Backend Issues (wp-admin) Got false bool when using update_field() Reply To: Got false bool when using update_field()

  • So @drew321, I try again maha…

    For your question about post_id, you have multiple ways. Just, all depend of your structure. How you have set that? …

    Since I don’t know the answer, I’ll tell you again how I would do it hehe.

    With WordPress you can create admin pages, but with ACF Pro, you can do it in a simpler way.

    Put a look here: https://www.advancedcustomfields.com/resources/options-page/.

    If you manage your admin pages with ACF Options Pages, you’ll be able to user update_field with “option” value for your $post_id instead of a specific post ID.

    For your question about Fetch: Fetch has coming with modern browser. But Fetch is like Ajax and it’s JavaScript. Not related with WordPress. Put a look here: https://www.w3schools.com/js/js_ajax_intro.asp

    But with WordPress, you can manage Ajax/fetch with security. You need to use the hook wp_ajax_{action} or wp_ajax_nopriv_{action} for that. Put a look here: https://developer.wordpress.org/reference/hooks/wp_ajax_action/