Hierarchical taxonomy UI
There is a plugin by Scribu called Category Checklist Tree that disables this “feature”.
There is a plugin by Scribu called Category Checklist Tree that disables this “feature”.
To add the taxonmies from post type post, the default, then it is easy to add taxonmies ‘category’ and ‘tags’ with a small plugin liek the source below. <?php /** * Plugin Name: Attachment Taxonomies * Plugin URI: * Text Domain: attachment_taxonomies * Domain Path: /languages * Description: * Version: 1.0.0 * Author: Frank Bültge … Read more
There may or may not be a better way to do this, but here’s how I would do it: $term = get_queried_object(); $children = get_terms( $term->taxonomy, array( ‘parent’ => $term->term_id, ‘hide_empty’ => false ) ); // print_r($children); // uncomment to examine for debugging if($children) { // get_terms will return false if tax does not exist … Read more
The function get_term_by() would allow you to get the taxonomy term name from the id. $quantityTermObject = get_term_by( ‘id’, absint( $quantityTerms ), ‘quantity_category’ ); $quantityTermName = $quantityTermObject->name;
Few months ago @tom-j-nowell (one of the mods here) wrote an article explaining the issues with the abuse of meta queries by many WP plugins: https://tomjn.com/2016/12/05/post-meta-abuse/ Among other things he says there: […] sites have been brought down by this, and it’s the reason a number of popular plugins don’t scale to high traffic […] … Read more
I have bit of trouble understanding your question. Taxonomy (like category) slug or term (like uncategorized) slug? get_term_children() works with terms so I will stick with that. Try this: $term = get_term( $id, $taxonomy ); $slug = $term->slug;
This should work for you: $taxonomyName = “age”; //This gets top layer terms only. This is done by setting parent to 0. $parent_terms = get_terms( $taxonomyName, array( ‘parent’ => 0, ‘orderby’ => ‘slug’, ‘hide_empty’ => false ) ); echo ‘<ul>’; foreach ( $parent_terms as $pterm ) { //Get the Child terms $terms = get_terms( $taxonomyName, … Read more
Sure thing, just use CSS and the ‘admin_head’ hook to make it disappear. I believe this is what you are looking for? (source: mikeschinkel.com) Just add the following to your theme’s functions.php file or to a .php file of a plugin that you might be writing. Note that I included an ‘init’ hook to define … Read more
Changing the slug of taxonomy works for me. Don’t know the reason behind it but it works.
Your code is correct, well almost correct. On first view, I must confess, I missed it too. You have two syntax errors in your code. If you look closely, ‘parent ‘ and ‘parent’ is not the same. You should not leave blank spaces between single quotes (‘) and arguments. Also, you don’t need to add … Read more