How to automatically compare date from custom post type with current date and change taxonomy based on a result?

This is pretty straight forward and easy to do with $wpdb and SQL statement the relationship between any post type (custom or not) and taxonomy term (custom or not ) are stored wp_term_relationships table which has object_id and term_id all you have to do is query the record that has the term_id for active1 term … Read more

coloring row’s background based on custom field value

function add_custom_status_class( $classes, $class, $post_id ) { if ( ‘request’ === get_post_type( $post_id ) ) { $status = get_post_meta( $post_id, ‘hrs_field_status’, true ); if ( $status === ‘accepted’ ) { $classes[] = ‘status-accepted’; } elseif ( $status === ‘rejected’ ) { $classes[] = ‘status-rejected’; } } return $classes; } add_filter( ‘post_class’, ‘add_custom_status_class’, 10, 3 ); … Read more