Custom post query by taxonomy

I’m slightly surprised that the first would work, because it’s terms, not term. Anyway, the correct way to do this is: $args = array( ‘post_type’ => array(‘product’, ‘comic’, ‘magazine’), ‘tax_query’ => array( array( ‘taxonomy’ => ‘Genres’, ‘terms’ => array( ‘hot’, ‘home’ ), ), ‘posts_per_page’ => 10 );

Structure for projects and clients

It sounds like you need both clients and projects to have “post-like” capabilities, meaning that using a taxonomy for clients wouldn’t make much sense. In this case, I would highly recommend the amazing “Posts 2 Posts” plugin by Scribu, found here: http://wordpress.org/extend/plugins/posts-to-posts/ The plugin allows you to create connections between posts, and makes it trivial … Read more

RSS feed for dynamic set of custom taxonomies terms

Code Tricks have an article on this. The article is so short that quoting it will essentially copy it: //URL to fetch RSS feeds for custom post type feeds. www.your-website.com/feed/?post_type=custom_post_type_name //URL to fetch RSS feed for custom post type feeds including the custom taxonomy. www.your-website.com/feed/?post_type=custom_post_type_name&taxonomy_name=taxonomy //This is just an example. www.code-tricks.com/feed/?post_type=tutorials&tutorials_category=javascript Please do see the … Read more

wordpress custom post type remove duplicate menu item

Just added ‘all_items’ => __( ” ), in labels array. Replace your code with below code register_post_type(‘news’, array( ‘labels’ => array( ‘name’ => __( ‘News’), ‘singular_name’ => __( ‘News’), ‘add_new’ => _x( ‘Add New News’, ‘News’), ‘add_new_item’ => __( ‘Add New News’), ‘edit_item’ => __( ‘Edit News’), ‘new_item’ => __( ‘New News’), ‘view_item’ => __( … Read more

Customize Search Results for Custom Post Type

According to this answer of yours, you can do the following inside your search.php: if (isset($_GET[‘post_type’])) get_template_part(‘search’, $_GET[‘post_type’]); else // no post_type given Then you have to set up the search-{post_type}.php files. If you want to handle only some of the existing post types differently, do this by means of a switch: $type = (isset($_GET[‘post_type’])) … Read more