Home › Forums › General Issues › Images Problems On Edit Post Form › Reply To: Images Problems On Edit Post Form
This will be a string value and may not update the parent correctly if not an integer.
$the_current_post = $_GET['profile_change'];
Note that I’m not 100% sure of this but it is always safe to make sure it is an integer
$the_current_post = intval($_GET['profile_change']);
These 2 lines could be returning image object instead of IDs, what you you have the return values set to?
$logo = get_field('company_logo', $the_current_post);
$cover_photo = get_field('תמונת_רקע', $the_current_post);
if you want to ensure that they return the ID no matter what the return value is set to then set formatting of the value to false and also insure that they are integers.
$logo = intval(get_field('company_logo', $the_current_post, false));
$cover_photo = intval(get_field('תמונת_רקע', $the_current_post, false));
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.