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…

    (In fact, it’s my third test. I think the URL I share break my send, but I have no notice…)

    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: advancedcustomfields[dot]com/resources/options-page/.

    If you manage your admin pages with ACF Options Pages, you’ll be able to use 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 browsers. But Fetch is like Ajax and it’s JavaScript. Not related with WordPress. Put a look here: w3schools[dot]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: developer.wordpress[dot]org/reference/hooks/wp_ajax_action/