Articles of categories

Specifying multiple categories in URL (permalink)?

For example: where dell and studio are categories A few months back I heard from someone that it is not possible. I need to know why? Which part of code prevents it? Is there any workaround for this?

How to create new category for custom post type?

I have create a custom post type named “jobs”, and I want to create a set of category for that, ie like “PHP Jobs”, “Python Jobs” etc. $args = array( ‘labels’ => $labels, ‘public’ => true, ‘publicly_queryable’ => true, ‘show_ui’ => true, ‘show_in_menu’ => true, ‘query_var’ => true, ‘rewrite’ => true, ‘capability_type’ => ‘post’, ‘exclude_from_search’ […]

WP Query with multiple categories – passing an array works?

According to the codex, to query posts that can belong to any of a collection of categories, we need to do something like this: $query = new WP_Query( array( ‘cat’ => ‘2,6,17,38’ ) ); However, I have the following, which works, and I’m not sure why. $args = array( ‘cat’ => $related_cat_ids, ‘posts_per_page’ => […]

functions.php conditional tag – only show in single.php?

//Geo Map add_action( ‘woo_post_inside_after’, ‘my_geo_mashup’ ); function my_geo_mashup() { global $post; if ( in_category(‘listings’) ) { echo GeoMashup::map(); } } Works to embed my map tag only on my single posts categorized as “listings” But, the embedded tag is also showing within the index of posts (thumb, title, meta, excerpt) and I need to remove […]

wordpress wp_list_categories

i’m using wp_list_categories like so: <?php //list terms in a given taxonomy using wp_list_categories (also useful as a widget if using a PHP Code plugin) $taxonomy = ‘news_cat’; $orderby = ‘name’; $show_count = 0; // 1 for yes, 0 for no $pad_counts = 0; // 1 for yes, 0 for no $hierarchical = 1; // […]

Warn me about 'uncategorized' posts

I always want new posts to have a category, but sometimes I forget. How can I make WordPress warn me when I’m about something ‘uncategorized’?

Add title, post content, and category like add_post_meta and update_post_meta

How can I update/add a new title, post content, and category to a post with hard PHP code similar to add_post_meta(), update_post_meta()?

Why would in_category only return one post in a specific category?

So… what I’m trying to do is simple – get the post content for all posts, but only in a given category. Simple – filter the loop using in_category. So I did this (this is actually a stripped version of the loop I used to try to troubleshoot this): <?php if ( have_posts() ) : […]

List Posts by Category for a Non-Zero, Non-NULL Custom Field Value?

(Moderators note: The original title was: “Need help identifying and looping through categories where posts have custom field set”) I need to loop through my categories however I need to limit the categories to those categories that include posts where the custom field of price != 0 or null. What is the best way to […]

Include template before a loop

This is my category / archive page i want to include a template before loop but i cant get posts based on category, it showing latest post only on every page. when i removed this line before the loop <?php include( TEMPLATEPATH . ‘/includes/tb/hot_posts.tpl.php’ ); ?> it work smoothly, but i need this template before […]