Include terms of future posts when using get_terms()
-
I’m currently using get_terms() to list all the terms within my “Event Regions” taxonomy. However, it only seems to list terms that are associated with published posts. How do I include the terms of future scheduled posts as well?
My current code:
echo '<ul>'; $event_regions = get_terms( 'event-region' ); foreach( $event_regions as $region ){ echo '<li'; if( $region->slug == get_query_var('term') ) { echo ' class="current-cat"'; } echo '><a href="' . get_term_link( $region ) . '">' . $region->name . '</a></li>'; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Include terms of future posts when using get_terms()’ is closed to new replies.