Only one category per post
Actually, I wrote a plugin for exactly that. http://wordpress.org/extend/plugins/radio-buttons-for-taxonomies/ In the plugin settings you define which taxonomies you’d like to apply this restriction to.
Actually, I wrote a plugin for exactly that. http://wordpress.org/extend/plugins/radio-buttons-for-taxonomies/ In the plugin settings you define which taxonomies you’d like to apply this restriction to.
$wp_query->get_queried_object() will give you the “currently queried object”. On a category archive this is the category object, on a author page this is the author, on a single post this is the post itself, … well, you get the the idea. If you only want the ID you can also use $wp_query->get_queried_object_id().
I posted an How To about it a week ago http://en.bainternet.info/2011/wordpress-category-extra-fields hope this helps. Ohad. Here are the details of the post: The first thing we need to do is add the extra fields to the category edit form using the hook edit_category_form_fields and we use a simple function that will print out the extra … Read more
See the Codex’s WordPress Taxonomy documentation. WordPress 2.3 replaced the previous categories, post2cat, and link2cat tables with three a more flexible set of taxonomy tables. wp_terms wp_term_relationships wp_term_taxonomy wp_terms– holds the basic information about single terms. term_id bigint(20) unsigned NOT NULL auto_increment, name varchar(200) NOT NULL default ”, slug varchar(200) NOT NULL default ”, term_group … Read more
Yes, you can use get_categories() using ‘child_of’ attribute. For example all sub categories of category with the ID of 17: $args = array(‘child_of’ => 17); $categories = get_categories( $args ); foreach($categories as $category) { echo ‘<p>Category: <a href=”‘ . get_category_link( $category->term_id ) . ‘” title=”‘ . sprintf( __( “View all posts in %s” ), $category->name … Read more
Taxonomies, as previously described are a collective noun for the following category post_tag post_format link_category custom taxonomy The first four are built-in taxonomies, while custom taxonomies are taxonomies that are manually created by the user with register_taxonomy. Custom Taxonomies can be hierarchical (like the build-in taxonomy category) or not (like post tags) The categories and … Read more
You are overloading the taxonomy category. Learn to use custom taxonomies. Some of your categories are in fact series, others belong into their own taxonomy too. Replace the hard coded navigation ul with a nav menu and look into the TwentyTen theme: it has a working solution for your problem. You can use your own … Read more