Efficient way to save a lot of meta data
Do all insert manually via wpdb (SQL). you can do multiple inserts with one sql statement. the wp_post_meta is very simple built.
Do all insert manually via wpdb (SQL). you can do multiple inserts with one sql statement. the wp_post_meta is very simple built.
Plugin development: get_post_meta is not working [closed]
get_the_terms() to show all custom taxonomies
Add multiple attributes to product from php
I’ve used this to insert posts with ACF/postmeta data successfully, but please test it on a development site before deploying live, there might be some terrible assumptions. Generally, it assumes that you only have each name once, that is “myfield” doesn’t exist in two field groups with different meanings. $mycustomvalue = 123; $f_mycustomfield = get_acf_key_by_name(“mycustomfield”); … Read more
As you will probably want to eventually do some reporting on the data, e.g. print a temperature average from this month last year in area X, I’d opt for custom tables from the beginning. I’m saying tables, because I don’t see a reason why you wouldn’t put the locations into a custom table as well. … Read more
Is it possible to update a post meta field through REST API if the format of it when registered is nested?
Query Posts depends on custom field inside repeater field using acf
You’re not echoing the result, it’s just returning which isn’t output to the page. You should be able to change return $result; into echo $result; and have it display. Just be aware that as you have your code now, it’s not going to return or echo a proper link. My guess is you could use … Read more
your query looks good and seems workning. I’ve made a test on my database and the image remained visible in the media library after the ID change. Maybe there was already other posts existing with that IDs