Comparing two dates (ACF and current time)
Comparing two dates (ACF and current time)
Comparing two dates (ACF and current time)
You need to specify the return-format of the acf-field as ‘l’ & then modify your query as follows: $todayName = date(‘l’); $schedules = new WP_Query([ ‘posts_per_page’ => -1, ‘post_type’ => ‘serie’, ‘meta_query’ => [ ‘relation’ => ‘AND’, [ ‘key’ => ‘status’, ‘value’ => ‘1’, ‘compare’ => ‘=’, ], [ ‘key’ => ‘release_date’ , ‘value’ => … Read more
How to rearrange posts based on input field values added by WordPress “Advanced Custom Fields”
$hb1, $hb2 and $hb3 are boolean variables, therefore if ( in_category($hb1, $this->post->ID) ) is always FALSE. Try the following code: $hb1 = in_category( array(‘News’,’Features’,’Tech’), $this->post->ID ); $hb2 = in_category( array(‘Research’), $this->post->ID ); $hb3 = has_tag( array( ‘aged care’, ‘anxiety/stress’, ‘autism’, ‘cognitive’, ‘Dementia’, “Parkinson’s”, ‘sleep’ , ‘well-being’ ), $this->post->ID ); if ( $hb1 ) { the_field(‘media_outlet’, … Read more
use this snippet here i get image which have post id 5 <img src=”https://wordpress.stackexchange.com/questions/344213/<?php echo site_url(); ?>/wp-content/uploads/<?php echo get_post_meta(5,”_wp_attached_file’,true); ?>’ height=”100″ width=”100″> check get_ani_taxonomy_fields($ani->term_id, ‘acf_image_field_name’) this function return post id
Advanced Custom Fields frontend form submission
I decided to rewrite my code and no longer use JS to open the Modal window, but pure CSS. I then attached the POST ID to the ID tag so that each modal window would be unique. code for a tag below. Href matches the ID on modal div. <a href=”#open-modal-<?php echo $post->ID; ?>” class=”button … Read more
So, I went and found a plugin called Adminimize https://wordpress.org/plugins/adminimize/ that allows me to show/hide admin menu items based on user roles. This allowed me to show the Options Page as editable for the custom user role I made but prevent them from editing other parts of the site.
Try this I have recorrected your code, if you have successfully retrieved those two variables $string = ”; $h_query = new WP_Query( $args ); if( $h_query->have_posts() ){ $string .= ‘<div class=”main_history”>’; while( $h_query->have_posts() ){ $h_query->the_post(); $h_button_field = get_field(‘history_button_title’); // used to display the custom field if( !empty($h_button_field) ): endif; $h_link = get_field(‘history_button_url’); // used to … Read more
ACF in WooCommerce mail template