Custom taxonomy query showing more than 4 posts

This is why code indentation is so important! Your posts_per_page argument is actually part of your tax_query: ‘post_type’ => ‘regularproducts’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘products-category’, ‘field’ => ‘slug’, ‘terms’ => $course_terms, //the taxonomy terms I’d like to dynamically query ‘posts_per_page’ => ‘4’ ), ), ‘orderby’ => ‘title’, Instead, you should have: $wp_query = … Read more

Custom Taxonomy Not Saving in Front End Post

I figured this out after much trial and error. Made some slight changes to the $new_post array. else if( !$error_msg && ‘POST’ == $_SERVER[‘REQUEST_METHOD’] && !empty( $_POST[‘action’] ) && $_POST[‘action’] == “new_post”){ $new_post = array( ‘post_title’ => $title, ‘post_content’ => $description, ‘post_category’ => array($_POST[‘cat’]), // Usable for custom taxonomies too ‘tags_input’ => array($tags), ‘tax_input’ => … Read more