Setup page template array in a custom post type

//tax_select – this lists all of the categories in a drop-down, we want to change to a checkbox case ‘tax_select’: $terms = get_terms( $field[‘id’], ‘get=all’ ); $selected = wp_get_object_terms( $post->ID, $field[‘id’] ); foreach ( $terms as $term ) { printf( ‘<input type=”checkbox” name=”%s[]” value=”%s” %s/><br />’, $field[‘id’], $term->slug, !empty( $selected ) && !strcmp( $term->slug, $selected[0]->slug … Read more

search using multiple taxonomies and keyword

I would recommend you to use a hook for pre_get_posts action. This action is fired before appropriate posts are fetched from db. In this hook you can add extra parameters to your query and have influence on returned results. So the basic implementation of your hook could be like this: add_action( ‘pre_get_posts’, ‘wpse8170_pre_get_posts’ ); function … Read more

Display featured posts for a custom post type by taxonomy

If you don’t need a “tag”, I have seen “Featured” items be featured by some a post meta key. I always need a way to feature items, so yesterday I wrote a plugin that will add a metabox to any post type you’d like, with a simple checkbox. Also has columns and quickedit capabilities. https://github.com/helgatheviking/Featured-Item-Metabox … Read more

Advanced archive url structure (category, tag and date)

Yes, it’s possible. Use custom query variables, declare rewrite rules to organize permalinks. For example, one can rewrite this URI: /movies/bruce-willis/2011 to this one: /index.php?post-type=movies&actor_tax=bruce-willis&requested_year=2011 (using WP_Rewrite) You need to “declare” your own “query variables” and use them in your own archive template.

displaying posts from a custom post type tags

You’re looking for WP_Query echo ‘<ul>’; //The Arguments $args = array( ‘post_type’ => ‘project’, ‘tagportfolio’ => ‘urban-design-and-landscape’ //should use the slug name not the full name ); // The Query $the_query = new WP_Query( $args ); // The Loop while ( $the_query->have_posts() ) : $the_query->the_post(); echo ‘<li>’; the_title(); echo ‘</li>’; endwhile; echo ‘</ul>’;