List active taxonomy terms

Well I did it.. <ul id=”filter”> <li><a href=”#” class=”current” data-filter=”*” title=””>*</a></li> <?php $term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) ); ?> <?php $term_id = $term->term_id; $taxonomy_name=”categories”; $termchildren = get_term_children( $term_id, $taxonomy_name ); foreach ( $termchildren as $child ) { $term = get_term_by( ‘id’, $child, $taxonomy_name ); echo ‘<li><a href=”#” data-filter=”.’ . $term->slug … Read more

Object of class WP_Query could not be converted to int inside shortcode

I rewrote the function based on a few other posts I have seen online and now have the following code which works without any errors. I am still open to any further suggestions on the best way to streamline this code even further it it can be. Thanks again function downloads_shortcode($atts){ extract(shortcode_atts(array( ‘download_type’ => ” … Read more

Best Plugins for Complex Index of Resources [closed]

CPT-onamies is a great plugin for this and would some extra custom fields not work? What I would do is use Advanced custom fields and load different fields based on the location rule. Like using the taxonomy term rule or you could go really specific with the post taxonomy and load fields when a certain … Read more

Make relation of custom taxomies

You can use taxonomy term meta for that. Like you said you have “team” and “player” taxonomy. Now you can add a taxonomy term meta on “player” taxonomy’s terms and save the “team” terms(where the “player” belong) ID on that “player” taxonomy term meta. Then get the the player based on that “team” taxonomy term … Read more

In Product Category archives how to show Posts having same/similar prod_cat slug structure?

Here I’ve written a function for you- function the_dramatist_get_product_cat_posts( $args = array() ) { $default_args = array( ‘taxonomy’ => ‘product_cat’, ‘get_post_type’ => ‘post’ ); $t = array(); $param = wp_parse_args($args, $default_args); $prod_terms = get_the_terms(get_the_ID(), $param[‘taxonomy’]); foreach ($prod_terms as $prod_term ) { $t[] = $prod_term->term_id; } $posts = get_posts(array( ‘post_type’ => $param[‘get_post_type’], ‘numberposts’ => -1, ‘tax_query’ … Read more

Get taxonomy url, name, post count & image

DonĀ“t know how this plugin works in detail but i would try this: <?php $taxonomy = ‘channel’; $tax_terms = get_terms($taxonomy); ?> <ul> <?php foreach ($tax_terms as $tax_term) { ?> <li> <?php echo esc_attr(get_term_link($tax_term, $taxonomy)); ?> <?php echo $tax_term->name; ?> <?php echo $tax_term->count; ?> <?php print apply_filters( ‘taxonomy-images-queried-term-image’, ” ); ?> </li> <?php } ?> </ul>