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 [...]
Terms
- « Previous
- 1
- 2
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.
Multiple term parentage
By the Web Warlock, Friday, 14/May/2010 9:25
Description of the Multiple term parentage feature of the ZYX Term Meta plugin.
The ZYX Term Meta plugin allows any term (either category, post tag or any other) to have any number of parent terms, even if the term belongs to a non-hierarchical taxonomy.
init_term_meta_cache
By the Web Warlock, Sunday, 9/May/2010 21:48
Description of the function init_term_meta_cache located in the file wp-content/plugins/zyx-term-meta/includes / term-meta-cache.php of the plugin ZYX Term Meta. Uses the plugins_loaded hook, the wp_cache_get, wp_cache_set and wp_parse_args functions, the methods $wpdb->get_results and $wpdb->prepare, and the $wpdb->prefix property of object $wpdb, mapping to fields term_id, meta_key and meta_value. Calls add_action at priority 1.
<?php init_term_meta_cache(); ?>
- « Previous
- 1
- 2
504 queries. 0.776 seconds. Powered by WordPress
Code is magic