• Resolved tomaspotesil2017

    (@tomaspotesil2017)


    I need to list the category of the filter. #_CATEGORYIMAGE unfortunately does not work. The code is specifically here:

    $output .= '<li class="list-inline-item"><img src="<?php if (function_exists(‘z_taxonomy_image_url’)) echo z_taxonomy_image_url(); ?>" /><input type="radio" id="'.$term->slug.'" name="category" value="'.$term->slug.'"><label for="'.$term->slug.'">'.$term->name.'</label></li>';

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    just to confirm, can I know where did you get or use the snippet above?

    Thread Starter tomaspotesil2017

    (@tomaspotesil2017)

    In search, in categories.php.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    using template file at /templates/placeholders/categories.php ?

    Thread Starter tomaspotesil2017

    (@tomaspotesil2017)

    No, I use the file in templates/search/categories.php.

    <?php $args = !empty($args) ? $args:array(); /* @var $args array */ ?>
    <!-- START Category Search -->
    <div id="event-type" class="tab-pane">
    	<div class="em-search-category em-search-field">
    		<ul class="list-inline">
    			<?php
    				function get_categories_checkboxes($taxonomies, $args) {
    				  $terms = get_terms($taxonomies, $args);
    				  foreach($terms as $term){
    				    $output .= '<li class="list-inline-item"><input type="radio" id="'.$term->slug.'" name="category" value="'.$term->slug.'"><label for="'.$term->slug.'">'.$term->name.'</label></li>';
    				  }
    				  return $output;
    				}
    				echo get_categories_checkboxes('event-categories', $args = array('hide_empty'=>true, 'hierarchical'=>true));
    			?>
    		</ul>
    	</div>
    </div>
    <!-- END Category Search -->
    Plugin Support angelo_nwl

    (@angelo_nwl)

    not sure if this will help you but maybe this external thread can give you some idea – https://wordpress.stackexchange.com/questions/188892/getting-a-taxonomys-thumbnail-url

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Category image in filter’ is closed to new replies.