Creating “static” taxonomies to choose from, inside custom post type?

Make it show_ui => false Then to show it on the post edit screen add the box manually add_action(‘add_meta_boxes’, ‘meta_boxes_function’); function meta_boxes_function() { add_meta_box(‘categoriesdiv’, ‘categories’, ‘post_categories_meta_box’, ‘blurb’, ‘side’, null, array(‘taxonomy’ => ‘categories’)); } use this code for every static term if(!term_exists(‘term1’, ‘categories’)) wp_insert_term(‘term1’, ‘categories’);

WP query taxonomy input differs to output?

A curious journey of a “cat“ Let’s assume we have the following category hierarchy: where the relevant rows from the wp_term_taxonomy table are: We want to query all posts in the animals category where the id is 65: $query = new WP_Query( array( ‘cat’ => 65 ) ); and try to understand why the resulting … Read more

Could not insert term into the database

OK. There where multiple issues here; wp_terms, wp_termmeta and wp_term_taxonomy all had their ID’s set not to AUTO_INCREMENT. Changing these and removing the 0 values from each table seems to have resolved this – very odd though. Big thanks to @N00b for helping!

Control term order on a per-post basis

I’m not sure if I understand exactly what your trying to accomplish but I’ve outlined a way for you to sort the order of terms associated with the current post. Html for the term order metabox: echo ‘<ul id=”the-terms”>’ $terms = get_the_terms( $post->ID, $taxonomy ); foreach ( $terms as $term ) { echo ‘<li class=”item” … Read more

Separate Media Library for each user

Built in features The Media Library has major updates with the upcoming version. You can see the changes in the slides by Daryl Koopersmith here. You can read the announcement and discussion on “Make”. Your request for “tags/categories” is already built into 3.5. Note The difference between themes and plugins is pretty easy: Display vs. … Read more

Custom Taxonomy as Dropdown in admin

This suppose you have a custom post type “sponsors” and a custom taxonomy “types”… function custom_meta_box() { remove_meta_box( ‘tagsdiv-types’, ‘sponsors’, ‘side’ ); add_meta_box( ‘tagsdiv-types’, ‘Types’, ‘types_meta_box’, ‘sponsors’, ‘side’ ); } add_action(‘add_meta_boxes’, ‘custom_meta_box’); /* Prints the taxonomy box content */ function types_meta_box($post) { $tax_name=”types”; $taxonomy = get_taxonomy($tax_name); ?> <div class=”tagsdiv” id=”<?php echo $tax_name; ?>”> <div class=”jaxtag”> … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)