How to display acf repeater in tag archive page?
How to display acf repeater in tag archive page?
How to display acf repeater in tag archive page?
new custom filed not showing in taxonomy
get_posts filter meta_query using ACF Checkbox
Run a function when a custom post is update?
The problems turned out to have something to do with the sortable columns function I wrote before. Please see the function below. function cpt_date_orderby( $query ) { $orderby = $query->get( ‘orderby’ ); if( ‘date’ == $orderby ) { $query->set(‘meta_key’, ‘date’); $query->set(‘orderby’, ‘meta_value_num’); } } add_action( ‘pre_get_posts’, ‘cpt_date_orderby’ ); The problem lies in line 3 where … Read more
There are 2 problems: Problem 1 Your AJAX endpoint looks for my_id: $id = $_POST[‘my_id’]; But your javascript sends id: id : my_id Importantly: id != my_id They do not match. There is no $_POST[‘my_id’], that’s why you get a PHP notice Problem 2 You’re using $_POST but the code does not make a POST … Read more
Found it : Replace acf by fields { “title”:”Sample ACF field demo”, “status”: “publish”, “fields”: { “title_fields” : “Custom title”, “rent_field” : 100, } }
ACF Taxonomy field values not select in backend
Instead of getting all of the image IDs and then cycling through them and outputting each one, you would first collect them into a single array and then use array_unique() to remove the duplicates. if( $categories_du_projet ) : $image_array(); foreach( $categories_du_projet as $term ) : if( $image_du_projet ) : $image_array[] = $image_du_projet; endif; endforeach; $image_array … Read more
ACF’s the_field() and get_field() accept several parameters, one of which is a post ID. So, you just need to get the ID of the page the field is on, like this: <?php $frontpage_id = get_option( ‘page_on_front’ ); the_field(‘contact_form_title’, $frontpage_id); // For pages other than home $page = get_page_by_path(‘some-page-slug’); the_field(‘contact_form_title’, $page->ID); ?>