How to query posts by meta keys AND under specific category?

Are you using a checkbox or similar for the ‘acf_platform’ field using ACF for more than one selection? Advanced Custom Fields stores these as a serialised array, so a meta_query with ‘compare’ => ‘=’ may not work. The ACF documentation suggests using ‘compare’ => ‘LIKE’ $args = array( ‘meta_query’ => array( array( ‘key’ => ‘field_name’, … Read more

Testimonials/Reviews for Products

The most frequent approach would be to create a new “review” or “testimonial” Custom Post Type (“CPT”) with a plugin or in your theme‘s functions.php file (or a new child theme‘s functons.php file, if your current theme is not custom-built), and then alter your product page template to use a secondary loop to display your … Read more

Use contact form for reviews

First add 1-5 * (star) Radio button on comment form. add_action( ‘comment_form_logged_in_after’, ‘add_review_field_to_comment_form’ ); add_action( ‘comment_form_after_fields’, ‘add_review_field_to_comment_form’ ); function add_review_field_to_comment_form () { echo ‘<p class=”comment-form-rating”>’. ‘<label for=”rating”>Rating</label> <span class=”commentratingbox”>’; for( $i=1; $i <= 5; $i++ ) echo ‘<span class=”commentrating”><input type=”radio” name=”rating” id=”rating” value=”‘. $i .'”/>’. $i .'</span>’; echo'</span></p>’; } Now save the Rating value to … Read more