How to get only one category of custom post type?

Never use query_posts! Use get_posts() or new WP_Query() instead. I think this will work however: $today = date(“Y/m/j”); $args = (array( ‘post_type’ => ‘event’, ‘posts_per_page’ => 10, ‘orderby’ => array( ‘wpse_meta_query_name’ => ‘ASC’, ‘post_title’ => ‘DESC’ // optional second orderby paramater ), ‘meta_query’ => array( ‘wpse_meta_query_name’ => array( // give the meta query arguments a … Read more

Multiple Archive Pages for Custom Post Types AND Taxonomies

You can create the taxonomy-{$custom_taxonomy}.php that will handle all request for you custom taxonomy, and rely on query string to show events based on month. The url can change based on your setting, but should be something like this: http://yourdomain.com/custom-taxonomy/term-a/?month=2013-07 Hooking into pre_get_posts action (search codex) you can modify the query for that taxonomy and … Read more

slick slider as custom post type

First of all you’ve written array(jquery) instead of array(‘jquery’). And also has not defined the slickinit enqueue position. So the right code will be- //Enqueue scripts add_action(‘wp_enqueue_scripts’, ‘wp_enqueue_all_scripts’, 999); function wp_enqueue_all_scripts(){ //add slick slider wp_register_style(‘slickcss’, get_template_directory_uri() . ‘/slick/slick.css’ ); wp_register_style(‘slickcsstheme’, get_template_directory_uri() . ‘/slick/slick-theme.css’ ); //load slick js wp_register_script(‘slickslider’, get_template_directory_uri() . ‘/slick/slick.min.js’, array(‘jquery’), ”, true ); … Read more

Limit taxonomy results to a single cpt

Before the loop in your taxonomy-locations.php file, global $wp_query; $args = array_merge( $wp_query->query, array( ‘post_type’ => ‘report’ ) ); query_posts( $args ); You could, alternatively, modify the query using an appropriate hook (this would be the most effecient method) – but since it is run for most queries, you would need to check it’s actually … Read more

Custom post type permalinks giving 404s

My plugin Custom Post Permalinks does this sort of thing for you: http://wordpress.org/extend/plugins/custom-post-permalinks If you’d rather use your own solution, I’ll need a bit more information, such as the registration code for the forums taxonomy. Just guessing, I’m thinking the regex for a forum looks identical to the regex for a topic to the rewrite … Read more

Get slug to point to different content of the same post

Based on the new details in the question: Instead of creating a separate “type2” post type, you could: Put all the data together in the “type1” post Have the “type2” permalink (example.com/taxonomy/type1/type2/) redirect to: example.com/taxonomy/type1/?type=type2 (you can make this query string whatever you want, but the gist is, redirect to a query string version of … Read more