custom term loader
-
Hello,
I am using the plugin and so far works except for the custom taxonomy term.
What I have is a custom category, a custom taxonomy and it’s terms wich I create.
If I queue the term name and it’s slug I have it but… can not parse it to the ALM plugin, this is my code that gives me the taxonmy and the term name’s and slug, they are correctly outputted.
<p>Taxonomy name <em><?php $the_tax = get_taxonomy( get_query_var( 'taxonomy' ) ); echo $the_tax->labels->name;?></em> and slug <em><?php $the_tax = get_taxonomy( get_query_var( 'taxonomy' ) ); echo $the_tax->labels->slug;?></em> also the term name <em><?php echo $term->name;?></em> and slug <em><?php echo $term->slug;?></em></p>
This is the short code which i use but I am lost ?? using taxonomy_terms will not return what I want.
If i mix it up with post_type I get all the custom post not filtered.
If i don’t use post_type I get the post_type=”post” which is the default but not affecting the taxonomy_terms filter which no post has.
<?php $the_tax = get_taxonomy( get_query_var( 'taxonomy' ) ); $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); echo '<div class="row">'; echo do_shortcode('[ajax_load_more post_type="service_egv" taxonomy="type_service_egv" taxonomy_terms="'.$term->slug.'" repeater="repeater2" offset="12" posts_per_page="8" scroll="false" pause="true" button_label="+"] '); echo '</div>'; ?>
Obviously I am mistaken in something but don’t get it.
solution
I was missing include the taxonomy filter so the short code has to include post_type, taxonomy and taxonomy_term such as
- The topic ‘custom term loader’ is closed to new replies.