Alter main query to always list posts according to ACF number field
Alter main query to always list posts according to ACF number field
Alter main query to always list posts according to ACF number field
Should anyone come across the same issue, I found that when creating the $gallery_data array I was creating an array of arrays instead of key value pairs, I ended up just running the update_field function inside a foreach with the add_image key value pair created. $gallery_img_id = rudr_upload_file_by_url($gallery_img[“original_path”]); $acf_gallery_slug = “gallery_image_” . $counter; $add_image = … Read more
Use Custom Field to Display Post Loop
Unless I’ve mis-interpreted what you are trying to accomplish, you added the foreach loop and you don’t need it. Having it run while inside a while loop seems to be duplicating your intentions. Remove the foreach loop altogether, delete the first wp_reset_postdata();, and un-comment the 2nd one: <div id=”carouselTestimonial” class=”carousel slide” data-bs-ride=”carousel”> <div class=”carousel-inner”> <?php … Read more
Include custom post type that matches taxonomy field in another custom post type
add class to woocommerce single product template gallery thumbnails if media attachment ACF field toggled (true/false)
You can use the relation = OR in your meta_query args. Something like this: $args = [ ‘post_type’ => ‘blogs’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => 24, ‘meta_query’ => array( ‘relation’ => ‘OR’, ‘featured_clause’ => array( ‘key’ => ‘featured_post’, ‘value’ => ‘yes’, ‘compare’ => ‘=’ ), ‘not_featured_clause’ => array( ‘key’ => ‘featured_post’, ‘value’ => ‘no’, ‘compare’ … Read more
Try using the wpuf_add_post_after_insert hook. This hook gets triggered right after a post is created using WPUF, which means it might be a more appropriate time to save additional data, like the phone number: add_action(‘wpuf_add_post_after_insert’, ‘update_product_acf_field_guest_submission’, 10, 3); function update_product_acf_field_guest_submission($post_id, $form_id, $form_settings) { // Check if the form ID matches the specific form where the … Read more
Phone number custom field and woocommerce updating issue noticed
Add “reviewedby” in WordPress posts