Showing custom taxonomy icon on ait-themes Directory
-
Hello lovely people,
Total noob here when it comes to WordPress customisation so bare with me.
I am using AIT Themes’ Directory+ theme on my website and I would like to show the URL of the image I defined in my custom taxonomy field
icon. The theme, by default, uses the following code to capture the icons defined for each of the custom taxonomy. I slightly modified the code so that it shows the default icon for thepod-market-sectorscustom taxonomy.{* CATEGORY ICON ** *} {if isset($category) && isset($category->taxonomy) && isset($category->term_id)} {var $icons = get_option($category->taxonomy . "_category_" . $category->term_id)} {if isset($icons['icon']) && $icons['icon'] != ""} {capture $categoryIcon} {$icons['icon']} {/capture} {else} {if $category->parent != 0} {? global $wp_query} {var $taxonomy = $wp_query->tax_query->queries[0]['taxonomy']} {var $category = get_term($category->parent, $taxonomy)} {var $icons = get_option($category->taxonomy . "_category_" . $category->term_id)} {if isset($icons['icon']) && $icons['icon'] != ""} {capture $categoryIcon} {$icons['icon']} {/capture} {else} {capture $categoryIcon} {if $category->taxonomy == "ait-items"} {$options->theme->items->categoryDefaultIcon} {elseif $category->taxonomy == "ait-events-pro"} {$eventOptions['categoryDefaultIcon']} {elseif $category->taxonomy == "member_of"} {$options->theme->items->categoryDefaultIcon} {elseif $category->taxonomy == "pod-market-sectors"} {$options->theme->items->categoryDefaultIcon} {else} {$options->theme->items->locationDefaultIcon} {/if} {/capture} {/if} {else} {capture $categoryIcon} {if $category->taxonomy == "ait-items"} {$options->theme->items->categoryDefaultIcon} {elseif $category->taxonomy == "ait-events-pro"} {$eventOptions['categoryDefaultIcon']} {elseif $category->taxonomy == "member_of"} {$options->theme->items->categoryDefaultIcon} {elseif $category->taxonomy == "pod-market-sectors"} {$options->theme->items->categoryDefaultIcon} {else} {$options->theme->items->locationDefaultIcon} {/if} {/capture} {/if} {/if} {/if}The theme somehow saves the icon information for the pre-defined custom taxonomies that comes with the theme under OPTIONS, however, I created a custom taxonomy myself using Pods plug-in and now I want to show the
iconfor each of the items under the taxonomypod-market-sectors.Can you help me?
Thanks a million!
The page I need help with: [log in to see the link]
The topic ‘Showing custom taxonomy icon on ait-themes Directory’ is closed to new replies.