term_id add_parent field depth Default: -1 (all levels). cur_depth Used for recursive control. use_cache Wheter use the term parentage cache or not. Default: true
Commands
get_all_meta_children
By the Web Warlock, Friday, 14/May/2010 13:11
Description of the function get_all_meta_children, located in the file wp-content/plugins/zyx-term-meta/includes / parentage.php of the plugin ZYX Term Meta. Uses the functions get_term_meta_children_from_cache, get_term_query_vars and wp_cache_set, and the methods $wpdb->prepare and $wpdb->get_results and the property $wpdb->prefix of the global object $wpdb.
<?php get_all_meta_children( $term_id = NULL , $add_parent = true , $field = '_parent' , $depth = -1 , $cur_depth = 0 , $use_cache = true ); ?>
get_all_meta_children: Source code
By the Web Warlock, Friday, 14/May/2010 13:08
source code of the function in the file parentage.php of the wp-content/plugins/zyx-term-meta/includes folder ZYX Term Meta get_all_meta_children
Source code of the function get_all_meta_children, located in the file wp-content/plugins/zyx-term-meta/includes/parentage.php of the ZYX Term Meta plugin.
How to display multiple parentage in a category template
By the Web Warlock, Friday, 14/May/2010 9:44
Example of the Multiple term parentage feature with the get_all_meta_children function for Category templates.
To display all the posts that belong to a category and include multiple parentage (that is, display also the posts that belong to a meta-children term), we'll have to redo a bit the query of The Loop. What we'll do is retrieve all the children of the queried term, and use the list of ids [...]
498 queries. 0.891 seconds. Powered by WordPress
Code is magic