0
votes
0answers
58 views

Function that get ACF fields value before saving

Rewrited question: There is a similar question HERE but I don't know how to combine it with my code. I have a function that relay on acf checkbox field. It is working fine but I have to update the ...
1
vote
1answer
142 views

Updating the database with advanced custom fields

I'm having a real problem with updating a database table using advanced custom fields within a custom post type. I have a table in the database called 'wp_company_profiles' with fields 'address_1' ...
0
votes
1answer
356 views

update_post_meta and update_field ony working when saving the post

I use Advanced Custom Fields (ACF) to store data in a custom field. I had latitude and longitude information stored separately, but I they need to be in one custom field so I made the function below. ...
0
votes
1answer
74 views

Perform function on publish AND save (not just save)

I am using this function to auto-set a post title based on a couple of custom fields: function set_event_title( $data , $postarr ) { if($data['post_type'] == 'event') { $getdate = ...
0
votes
1answer
94 views

does acf_save_post cause endless loop?

I am using Advanced custom fields acf_save_post hook in one of my functions. In that function I use the add_post_meta function. Does this call acf_save_post again and cause an endless loop? ...
1
vote
1answer
221 views

Faking the “onSave” event

While a specific use-case, I believe this may benefit others. I am using TurboCSV to mass-import a number of posts into WordPress (which it is doing wonderfully so far). Within that import, I am ...