Modals using loops and ACF [closed]

You’re right you should be using an id. I would use a counter in conjunction with get_the_ID(); $arr_posts = new WP_Query( $args ); if ( $arr_posts->have_posts() ) : $index = 0; while ( $arr_posts->have_posts() ) : $arr_posts->the_post(); echo $index . ‘_’ . get_the_ID(); endwhile; endif; This will give you a unique id which you can … Read more

WP_Query meta_query >= date

What is missing? One tiny detail… And it’s easy to overlook… the_field(‘datum_event’); Prints the field using the format you’ve defined in field settings. But… It has nothing to do with how the value of that field is stored in DB. ACF uses YYYYMMDD format when storing date values in DB. And WP_Query doesn’t use field … Read more

Insert Commas into ACF number field

You need to ‘hook’ your function to a valid hook. Your add_action call is not doing anything, because it is not a proper call to a hook.. See the docs https://developer.wordpress.org/reference/functions/add_action/ for add_action. Your function is the second parameter of the add_action hook. The first parameter is ‘where’ to hook into WordPress. If you want … Read more

“add_post_type_support” with Custom Post Type & ACF

You need to use filters to hook into manage_posts_columns and manage_posts_custom_column which will let you add the table heading and dates. The filters are slightly special as you need to include the name of your custom post type manage_{$post_type}_posts_columns manage_{$post_type}_posts_custom_column where {$post_type} in your case is conferences // Add the table heading function conf_columns_head($defaults) { … Read more

How to retrieve category NAME instead of ID in a function with a taxonomy custom field?

You need to get the term object first. //Your meta field $post_custom_title = get_post_meta($post_id,’car_name’,true); //Get the term object by id. change taxonomy_slug to the taxonomy you intend to use $term = get_term_by( ‘id’, $post_custom_title, ‘taxonomy_slug’ ); //Retrive the term name and use it as post title $term_name = $term->name; //call the wp_update_post function setting $term_name … Read more

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