[Plugin: Ajax Post Carousel] Filtering by taxonomy
-
Great work on the new release; it’s getting much better.
Can you explain how to filter by taxonomy/tags? I’m not sure if I’m misunderstanding, if I’m doing this wrong or if this is a bug. I can’t seem to get it to filter by default tag (post_tag) or custom taxonomy.
Using the shortcode, i’ve tried:
//custom taxonomy page $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); echo do_shortcode('[apc-carousel visible_posts=3 init_posts=6 show_title=1 show_excerpt=0 loop=1 post_type=all '.$term->taxonomy.'='.$term->name.']');
I have a custom taxonomy called ‘authors’. The above would print something like ‘authors=jim-collins’ but nothing gets returned. Authors is the taxonomy ‘slug’ and ‘jim-collins’ is the term slug.
I’ve also tried:
echo do_shortcode('[apc-carousel visible_posts=3 init_posts=6 show_title=1 show_excerpt=0 loop=1 post_type=all tag=book]');
This doesn’t filter to show only posts with ‘books’ as the tag (default post_tag). Am I missing something?
My goal is, if on a category page to show posts in those categories, if on a taxonomy/tag page to show posts with those taxonomy/tags, etc.
Also, is it possible to choose multiple categories? Like category=category1&category2$category3 ?
- The topic ‘[Plugin: Ajax Post Carousel] Filtering by taxonomy’ is closed to new replies.