A question on creating filters for custom posts using taxonomy

you can check on your taxonomy-services.php what is the current queried term filter based on that, something like this: //get the current term $term_slug = get_query_var( ‘term’ ); //get the current taxonomy $taxonomyName = get_query_var( ‘taxonomy’ ); //get the term object if you want $current_term = get_term_by( ‘slug’, $term_slug, $taxonomyName ); //then you can query … Read more

How to display custom taxonomies with links in filter menu?

<div id=”filtering-nav”> <a href=”#” class=”filter-btn”><span>Filter</span></a> <ul> <li><a href=”#all” class=”all”>All</a></li> <?php $args=array(‘orderby’ => ‘name’,’taxonomy’=>’galleries’); $galleries=get_categories($args); foreach($galleries as $gallery){ ?> <li><a href=”<?php echo get_category_link( $gallery->term_id ) ; ?>” class=”<?php echo $gallery->gallery_nicename; ?>”><?php echo $gallery->name; ?></a></li> <?php } ?> </ul> <div class=”clearfix”></div> When you pass argument to get_categories function , you need to pass name of taxonomy as … Read more

wordpress wp_list_pages help

The wp_list_pages() function uses get_pages(), which accepts a post_type argument-array key, so you can use that same argument array key in `wp_list_pages(): <?php wp_list_pages( array( ‘post_type’ => ‘casestudy’ ) ); ?> Unfortunately, it looks like the post_type value must be a string, rather than an array (that is, if I’m reading the source correctly); which … Read more

Extending AZIndex plugin to use custom post types and custom taxonomies

Plugin by default works with two deafult WordPress taxonomies ‘category’ and ‘post_tag ‘. As you already know WordPress has three built in taxonomies ‘category’, ‘post_tag’ and ‘link_category’. Further, plugin trace two WordPress post types ‘post’ (normal posts) and ‘page’. When you know this and that, you can easily modify plugin to index your_custom_taxonomy and your … Read more