First of all I want to thank all of your for reading my post and trying to answer my question. I'm having an issue regarding the taxonomies of Wordpress.
I created a website with a custom taxonomy and placed them in the backend in Hierarchy. The goal for me is to display al the taxonomies in hierarchical way on my wordpress site. For now i managed to echo the list on alphabetical order.
Are there guys around who can help me with creating a Hierarchical way of showing the taxonomies?
My code:
<?php $terms = get_terms( 'locations', array( 'hide_empty' => false ) ); ?>
<?php if ( ! empty( $terms ) ) : ?>
<div class="col-sm-7">
<div class="module">
<div class="module-content">
<h4><Bekijk een wijnland</h4>
<div class="row">
<ul class="not-found-links">
<?php foreach ( $terms as $term ): ?>
<li class="col-sm-4">
<a href="<?php echo get_term_link( $term, 'locations' ); ?>"><?php echo esc_html( $term->name ); ?></a>
</li>
<?php endforeach; ?>
</ul>
</div><!-- /.row -->
</div><!-- /.module-content -->
</div><!-- /.module -->
</div><!-- /.col-* -->
<?php endif; ?>
</div><!-- /.row -->
</div><!-- /.not-found-content -->
</div>
</div><!-- /.content -->
I placed the taxonomies in a table. See: http://winelisting.nl/wijnlanden/.
Many thanks in advance.
Kind regards,
Brent