How to update a custom post title from a front-end form using ACF fields?

You check if !$value before assigning the title from the fields, that test will be false once the post has a title. If you always want it to update, then remove the test. function auto_title_insert() { return $_POST[‘fields’][‘field_538626f57e84c’].’ ‘.$_POST[‘fields’][‘field_538627ffeccb0′].’ ‘.$_POST[‘fields’][‘field_53863a5c7502b’].’ ‘.$_POST[‘fields’][‘fields[field_53a9bb09f82ba]’]; } add_filter( ‘title_save_pre’, ‘auto_title_insert’ );

Order Custom post type loop by custom field (datepicker)

Your second approach should in my mind actually work, you do it like this: Code: $args = array( ‘post_type’ => ‘agenda’, ‘posts_per_page’ => -1, ‘meta_key’ => ‘datum_agenda’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘ASC’ ); $my_query = new WP_Query( $args ); There are two pages at the ACF documentation you might want to read: Date Picker … Read more

Query by 2 values of a repeater ACF field

I know this is an old question, but I thought I’d post the answer in case anybody else is facing the same problem. functions.php: function add_cond_to_where( $where ) { //Replace showings_$ with repeater_slug_$ $where = str_replace(“meta_key = ‘showings_$”, “meta_key LIKE ‘showings_%”, $where); return $where; } add_filter(‘posts_where’, ‘add_cond_to_where’); Query: //Replace showings_$ with repeater_slug_$ //Replace _discounts with … Read more

Revolution Slider Orderby Two Custom Fields

To order by event-end date or start date, your write separate function and call them as per requirement. For example if user clicks on order by start then start function should be called. switch($orderby){ case: ‘event-start’: # your code /* $query[‘meta_key’] = ‘event_start_date’; $query[‘orderby’] = ‘event_start_date’; */ break; case ‘event-end’: #your code /* $query[‘meta_key’] = … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)