I need to display an icon associated to a custom WordPress taxonomy. The code for the taxonomy is:
$labels = array(
'name' => 'Country/State/City' ,
'singular_name' => 'Genre' ,
'search_items' => __( 'Search Country/State/City' ),
'all_items' => __( 'All Country/State/City' ),
'parent_item' => __( 'Parent Country/State/City' ),
'parent_item_colon' => __( 'Parent Genre:' ),
'edit_item' => __( 'Edit Country/State/City' ),
'update_item' => __( 'Update Country/State/City' ),
'add_new_item' => __( 'Add New Country/State/City' ),
'new_item_name' => __( 'New Country/State/City' ),
'menu_name' => __( 'Country/State/City' ), );
register_taxonomy( 'location', 'post', array( 'hierarchical' => true, 'labels' => $labels, 'query_var' => true, 'rewrite' => true ) );
I created a folder inside my theme folder which contains the country flags (Spain.png, France.png, etc)
I need to display a list with the latest posts titles with the flag next to it.
So I thought I could do the loop and get, let's say, the latest 10 posts from a post category, display it's title and the icon next to it would be the "path-to-image-folder/taxonomy-country.png"
I don't know how to do it... can anyone give me a hand to jump start me please?