Hey! ?? Thanks for using Recipe Hero.
There isn’t a built in way but cuisines / courses are actually just taxonomies, so it’s really easy to using something like with get_terms()
.
Here’s a really simple example of using it to make a list of cuisines with links to the ‘archives’ of them (and hiding the empty ones):
$args = array( 'hide_empty=1' );
$terms = get_terms( 'cuisine', $args );
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
$count = count( $terms );
$i = 0;
$term_list = '<p class="my_term-archive">';
foreach ( $terms as $term ) {
$i++;
$term_list .= 'name ) . '">' . $term->name . '';
if ( $count != $i ) {
$term_list .= ' · ';
}
else {
$term_list .= '</p>';
}
}
echo $term_list;
}
Try that and let me know how you go!
I’ve also added this to the Recipe Hero roadmap – https://trello.com/c/H0R8sHaL/11-shortcode-method-to-list-cuisines-and-courses – as I think it’d be interesting to look into maybe introducing a shortcode or something like that to make this easier.