Exclude the category of the current post
wp_get_post_categories() (Codex reference) is used to get the categories for a post
wp_get_post_categories() (Codex reference) is used to get the categories for a post
Your SQL isn’t limiting the term matching to categories only. You’re also getting back tags and any other taxonomy. So the data coming back may be more than expected. Taxonomy is a key in the term_taxonomy table, so it should be fast to eliminate the ones you don’t need. SELECT DISTINCT(terms.term_id) as ID, terms.name FROM … Read more
I’ve prepared a plugin for WPEC which enables you to use Category Order and Taxonomy Terms Order plugin on variations items. So, changing variations items order is as easy as drag and drop. You can download it at: http://david.binda.cz/products-page/plugins/custom-variation-order-for-wordpress-e-commerce
if category.php does not exist, make a copy of archive.php or index.php and save it as category.php; then, before the start of the loop, add: <?php global $query_string; query_posts( $query_string . ‘&posts_per_page=-1’); ?>
in a category archive, the code could be: echo get_category_link(get_query_var(‘cat’)); in a tag archive, this could be: if(is_tag()) echo get_term_link(get_query_var(‘tag’), ‘post_tag’); the conditional was added to avoid an error messages if not in a tag archive.
Categories are a hierarchical taxonomy. Tags are simply a non-hierarchical taxonomy. If you don’t have a use for categories otherwise, then use them for genre. If you have a need for them, then create more taxonomies as needed for additional classification/categorization, etc.. get_sidebar(‘mysidebar’); is for calling a sidebar template file, in your case sidebar-mysidebar.php. dynamic_sidebar(‘name’); … Read more
so your permalinks are /%category%/%postname%, are you using a plugin to remove the category base? typically path to the category page would be subdomain.domain.com/category/*categoryname*/*subcategoryname*/
I’m not certain what you’re asking, but maybe Scribu’s Posts 2 Posts plugin will help you.
You need to use wp_list_categories() (Codex ref), using the child_of argument. Assuming you know the ID of the “Podcasts” category, e.g. 123: wp_list_categories( array( ‘child_of’ => ‘123’ ) ); If you need to find the category ID, use get_category_by_slug (Codex ref): $cat = get_category_by_slug( ‘podcasts’ ); $catid = $cat->ID; wp_list_categories( array( ‘child_of’ => $catid ) … Read more
You would want to create an array of those values from your spreadsheet and loop through them to call the wp_insert_category function on each one. http://codex.wordpress.org/Function_Reference/wp_insert_category