Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #394006

    Michael Sena
    Full Member
    Post count: 67

    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
    Full Member
    Post count: 67
    This reply has been marked as private.
    #394027

    Guust
    Moderator
    Post count: 23306

    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
    Full Member
    Post count: 67

    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
    Full 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
    Full Member
    Post count: 67

    Beautiful…thanks Giri!

    #394342

    Giri
    Full Member
    Post count: 3155

    You are welcome.

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

The topic ‘Supreme Directory Category Icons’ is closed to new replies, this may be for inactivity, please open a new topic if you have a similar question.

  • How to add a new support ticket

    To open a new support ticket, first select the relevant forum and then click the "New Post" button. Example: You need support for the core plugin? Click on GeoDirectory Core Plugin support and click on the "New Post Button".
  • Support Policy

    Please read the support policy before starting to use the forum.
  • Are you a developer?

    Make Money with GD Jobs

    Get listed in the GeoDirectory Experts Directory. There may be a new client waiting for your services.
  • Looking for a GD developer?

    We do not provide customization services, but feel free to check out the GeoDirectory Experts Directory, there you'll find several freelance GD experts ready to start working with you.