Home › Forums › Backend Issues (wp-admin) › modify field look in admin area based on value › Reply To: modify field look in admin area based on value
Thank you! That is what i was looking for, but i have huge memory problem now.
I’m trying to compare field with field from another post type using global $post
, that’s causing my website to Fatal error: Allowed memory size exhausted
.
First i wanted to make one function for acf/load_field
hook, but with page never loading i added different functions for different acf/load_field/name=
hooks.
Still it’s not working.
code looks like this, even for 2 types of the field (or keys) i still get memory limit problems:
global $post;
$orig = get_field('original_id',$post->ID);
if($orig) {
$field['instructions'] = get_field($field['name'],$orig); // that line is causing problems
}
return $field;
edit: lol, just clicked “solved” by mistake 😀
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.