Supreme Directory Category Icons

This topic contains 6 replies, has 3 voices, and was last updated by  Giri 6 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #394006

    Michael Sena
    Buyer
    Post count: 72

    Hello,

    My Category icons are stacked at the end of the listing title/rating area. How can I get them to appear inline below the City/State and Rating line.

    Also is it possible for the icon description to appear as in a rollover rather than a link?

    It would also be great if the Tags could appear under the Category icons rather than at the top of the sidebar.

    I attached an image that may better show what I’m hoping for. Thanks for your help with these items!

    Mike

    Geodirectory 1.6.23 / Supreme 1.1.6 / WP 4.8.1

    #394008

    Michael Sena
    Buyer
    Post count: 72
    This reply has been marked as private.
    #394027

    Guust
    Moderator
    Post count: 29970

    Correct this CSS, from

    
    
    .sd-contacts {
        display: none;
    }

    to

    
    
    .sd-contacts {
        visibility: hidden;
        height: 0px;
    }

    Not sure what you mean with rollover? You want the link to be hidden? What do you want to happen on mouseover?

    Thanks

    #394076

    Michael Sena
    Buyer
    Post count: 72

    Hey Guust

    Thanks for the .sd-contacts css revision, that works perfectly. I can get the link text hidden with:

    .cat-link {
    display: none;
    }

    So I’m good there. On the Category icon mouseover (hover), I’d like the image title or alt text to be shown. As it is now…the category URL is shown.

    Thanks!

    #394239

    Giri
    Expired Member
    Post count: 3155

    Hi Michael,

    Try this code.

    
    
    add_filter('sd_details_output_cat_links', 'custom_sd_details_output_cat_links');
    function custom_sd_details_output_cat_links($cat_links) {
    	global $preview, $post;
    	if (!$preview) {
    		$post_type = $post->post_type;
    		$post_tax = $post_type . "category";
    		$post_cats = $post->{$post_tax};
    	} else {
    		$post_type = $post->listing_type;
    		$post_tax = $post_type . "category";
    		$post_cats = isset($post->post_category) ? $post->post_category[$post_tax] : $post->{$post_tax};
    	}
    
    	if (is_array($post_cats)) {
    		$post_cats = implode(',', $post_cats);
    	}
    
    	$cats_arr = array_filter(explode(",", $post_cats));
    	$cat_icons = geodir_get_term_icon();
    
    	$cat_links = '<div class="sd-detail-cat-links"><ul>';
    	foreach ($cats_arr as $cat) {
    		$term_arr = get_term($cat, $post_tax);
    		$term_icon = isset($cat_icons[$cat]) ? $cat_icons[$cat] : '';
    		$term_url = get_term_link(intval($cat), $post_tax);
    		$cat_links .=  '<li><a href="' . esc_url($term_url) . '" title="' . esc_attr($term_arr->name) . '"><img src="' . esc_url($term_icon) . '">';
    		$cat_links .= '<span class="cat-link">' . esc_attr($term_arr->name) . '</span>';
    		$cat_links .= '</a></li>';
    	}
    	$cat_links .= '</ul></div> <!-- sd-detail-cat-links end --> </div> <!-- sd-detail-info end -->';
    	
    	return $cat_links;
    }
    #394292

    Michael Sena
    Buyer
    Post count: 72

    Beautiful…thanks Giri!

    #394342

    Giri
    Expired Member
    Post count: 3155

    You are welcome.

Viewing 7 posts - 1 through 7 (of 7 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket