PHP Customization: Taxonomies and Queries, why? [closed]

Before you start theme development, I suggest you familiarize yourself with general WordPress Usage & Terminologies. Taxonomy: In general taxonomy means classification. In WordPress, posts, pages, custom post types etc. can be further classified by using different taxonomies. For example, you may have hundreds of blog posts. Now how do you classify them for better … Read more

functions to create term and child terms

To create a taxonomy, you should use register_taxonomy(). This function accepts three arguments: <?php register_taxonomy( $taxonomy, $object_type, $args ); ?> The documents on the codex are plenty self explanatory. Now, to insert a term into a taxonomy, you can use wp_insert_term(). Again this function accepts 3 arguments: <?php wp_insert_term( $term, $taxonomy, $args = array() ); … Read more

Is It Possible To Have Shared WordPress Custom Post Types?

I have partly solved my own question so-to-speak. I’ve been trying to get post type relationships working for ages and the plugin relation post types as mentioned in my comment to Christopher’s answer. It is far from perfect, but I worked out how to get this plugin: http://wordpress.org/extend/plugins/relation-post-types/ – working (albeit not that pretty). The … Read more

Custom taxonomy admin page

Not sure why I didn’t think of this earlier. I suppose I was hoping for a way to ‘hijack’ the default page to display something else… Anyway following my original method: If you want a custom admin page for a taxonomy, you can set ‘show_ui’ => false when you register it to suppress the default … Read more

Add a term to an attachment submitted from front end

media handle sideload returns an attachment ID, and attachments are normal posts with the post type ‘attachment’. All the same things apply, featured images parents taxonomies post meta etc albeit with a few attachment oriented functions like wp_get_attachment_image So use wp_set_object_terms as you normally would, e.g.: $id = media_handle_sideload(…. if(!is_wp_error($id)){ wp_set_object_terms( $id, array(terms…), $taxonomy, $append … Read more