How to filter Multiple taxonomies with radio buttons

Here’s how you do it, <form name=”filterby” action=”” method=”GET”> <input type=”radio” name=”cartype” value=”bentley” OnChange=”document.filterby.submit()” /> Bentley<br /> <input type=”radio” name=”cartype” value=”bmw” OnChange=”document.filterby.submit()”/> BMW <input type=”radio” name=”cartype” value=”bugatti” OnChange=”document.filterby.submit()”/> Bugatti </form> <?php $selection = $_GET[‘cartype’]?$_GET[‘cartype’]:’bentley’; $args = array_merge( $wp_query->query, array( ‘post_type’ => ‘cars’, ‘taxonomy’ => $selection, ‘order’ => desc ) ); query_posts( $args ); if (have_posts()) … Read more

Content in WP Editor displayed below CPT shortcode [duplicate]

Your shortcode should return it’s output and not echo it out ex: $defaults = apply_filters( ‘arconix_faq_shortcode_query_args’, array( ‘post_type’ => ‘faq’, ‘showposts’ => ‘all’, ‘order’ => ‘ASC’, ‘orderby’ => ‘title’ ) ); extract( shortcode_atts( $defaults, $atts ) ); /** Translate ‘all’ to -1 for query terms */ if( $showposts == “all” ) $showposts = “-1”; /** … Read more

Redirecting search to specific templates with $_GET[“post_type”]

I think you need to check status in your search-news.php template. And if $_GET[‘status’] is equal to future, create custom loop for it. Your search-news.php could look something like this: if ( $_GET[‘status’] == ‘future’ ) : $the_query = new WP_Query( array( ‘post_type’ => ‘news’, ‘post_status’ => ‘future’, // else arguments … ) ); while … Read more

Display future posts in search

Something like this might work: <?php while (have_posts()) : the_post(); ?> <?php if ( ‘future’ === get_post_status( the_ID() ) ) : ?> <div <?php post_class(); ?>> <div class=”news-item” onclick=”location.href=”https://wordpress.stackexchange.com/questions/54815/<?php echo the_permalink(); ?>””> <h2><a href=”https://wordpress.stackexchange.com/questions/54815/<?php echo the_permalink(); ?>”><?php echo the_time(‘d.m.Y’); ?> / <?php echo the_title(); ?></a></h2> <p class=”news-page”> <?php if (get_field(‘description’) != “”) { ?> <?php … Read more