Advenced custom fields auto fill problem
Ok, fixed. I changed ‘post_id’ => ‘new’ to ‘post_id’ => ‘rand()’. It’s working but dont know it shout be like that. Can someone that know php check the code ?
Ok, fixed. I changed ‘post_id’ => ‘new’ to ‘post_id’ => ‘rand()’. It’s working but dont know it shout be like that. Can someone that know php check the code ?
Just make the field type as text and it will work
I hope I understand the question correctly UPDATE `wp_postmeta` SET `meta_value` = replace(meta_value, ‘old_value’, ‘new_value’) WHERE `meta_key` LIKE ‘your_key’ EDIT 1 : i forgot to mention : BACKUP YOUR DATABASE BEFORE ANY TRIAL EDIT 2 : following comment : To copy from one field to another (I got a bit confused with your naming and … Read more
Solved. $value = get_field( “field_5a18ee424e883”, 4229 ); print_r ($value);
Use only $axy instead of ‘terms’ => array(var_dump($axy) ), … It will work, surly. Try it. ‘terms’ => $axy,
WordPress content is “frozen”. That is, if you add an alt on an image after posting an article with the image, the alt attribute will not be updated on its own. If you ever use Gutenberg, it is easy to be able to make a regex and update your article on the fly. You can … Read more
I don’t think ACF has a built-in function to do what you want. You can use get_field to retrieve a value from any post, but it requires a post ID if you want the value from anything other than the current post. So instead, we can query posts using WP_Query and pass the meta key … Read more
When you moved the site, did you export and then re-import the content? I’m wondering if maybe the custom data just didn’t make it into the live server’s database. The first place to look for whether that’s the case would be either on the post’s edit screen or within the database itself with PHPMyAdmin or … Read more
the_field() takes an optional second parameter of $post_id. If you know the post you want, presumably you can use that to grab the data you need.
you can use the number param to limit the number of pages you want and get the custom field in the foreach loop 🙂 (child of = your parent page, or the current page) $mypages = get_pages( array( ‘child_of’ => $post->ID, ‘sort_column’ => ‘post_date’, ‘sort_order’ => ‘desc’, ‘number’ => 3, ) ); foreach( $mypages as … Read more