Trouble passing attribute into shortcode function

Sorry I deleted my comment because I found the issue. You need to do an html entity decode on query variable. Use the code below. function hey_query_shortcode( $atts ) { extract( shortcode_atts( array( ‘query’ => ”, ‘style’ => ” ), $atts ) ); $query = html_entity_decode( $query ); ob_start(); $the_query = new WP_Query( $query ); … Read more

problem with the loop

did you try this? $custom_query_args = array( ‘post_type’ => ‘casestudy’, ‘connected’ => $post->ID ); $the_query = new WP_Query(); $the_query->query($custom_query_args);

Related “custom post type” using “custom taxonomy”

Assuming that you are on a taxonomy or term page then you can simply use: //get current term $term_slug = get_query_var( ‘term’ ); //get current taxonomy $taxonomyName = get_query_var( ‘taxonomy’ ); $loop = new WP_Query( array( ‘post_type’ => ‘work’, ‘posts_per_page’ => 10, ‘orderby’ => ‘ASC’, $taxonomyName => $term_slug); while ( $loop->have_posts() ) : $loop->the_post();