Category Images, Icons & Listing Descriptions
This topic contains 7 replies, has 3 voices, and was last updated by Gerard Cooper 8 years, 8 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
July 25, 2016 at 5:20 pm #233403
I recently started using GeoDirectory with the Supreme Directory theme and the multiple location module, and overall I think it works well. However I have a few issues.
I was having large category images show on my map because I had uploaded large images to the “Category Icon” image. I figured out how to remove them from the map by looking at some other posts here, but I am still left with an issue.
I need to have the “Default Listing Image” show in the top of the page in the “Popular Categories” section for each category, not the little map pin icon I uploaded as the “Default Listing Image” for each category.
I also need to limit the long text descriptions that are shown on the homepage. These mess up the layout. I only want these full descriptions to show on the single listing pages.
Can someone offer input on how can these things be accomplished?
July 25, 2016 at 6:54 pm #233425Hi,
the category icon is what is used in the maps and category widgets.
The category default image is only used in the listings page (archives) as thumbnail for listings without images.
It is not possible to use the images instead of the icons in the popular category widget without customizing the popular category widget code, I’m sorry.
The listings excerpt length of the home page widgets can be changed from the widget settings. Go to Appearance >> Widgets >> GD Home Content Section and change the “Post Content excerpt character count” of the Popular post view widgets in use.
Thanks
July 26, 2016 at 7:34 pm #233847Thanks for your reply.
So in the Popular Category widget code in general_functions.php, I see the below code. What can I replace $term_icon_url with to show the Default Listing Image instead?echo '<img alt="' . esc_attr($cat->name) . ' icon" style="height:20px;vertical-align:middle;" src="' . $term_icon_url . '"/> <span class="cat-link">'; echo $cat->name . '</span> <span class="geodir_term_class geodir_link_span geodir_category_class_' . $post_type . '_' . $cat->term_id . '">(' . $total_post . ')</span> ';
I actually need to change the character count of the “Latest Places” sidebar widget on the homepage. The character filter in the widget does not change anything. How is this changed?
July 27, 2016 at 5:08 pm #234201Hi,
you shouldn’t edit plugin files, or after every update you’d loose your customization.
I asked to the developers to check if there is a hook or method to help you achieve that without messing with core files.For the second problem I’d need to have a look at your dashboard. Please provide a link and admin credentials and we will have a look.
Thanks
July 27, 2016 at 7:19 pm #234295Hi Paolo. Thanks for the reply. It would be great if there is a hook, but if I have to edit the plugin I will. I keep detailed logs for when I have to do updates. I just can’t seem to find what should replace $term_icon_url to show the default image.
I will provide a link and admin credentials.
July 28, 2016 at 2:35 pm #234963I have checked our source code. We don’t have any filter for modifying
$term_icon_url
However
$term_icon_url
uses
get_option('gd_term_icons')
behind the scenes. So you can modify the values returned by get_option function via pre_option filter.
https://codex.wordpress.org/Plugin_API/Filter_Reference/pre_option_(option_name)
However it will affect all functions that uses
get_option('gd_term_icons')
July 28, 2016 at 2:44 pm #234973If you want I can add a filter in our plugin according to your requirement.
Do you want to replace term icons with “Default listing image” only in Popular Cats widget ?
August 2, 2016 at 2:06 pm #239114Hello Giri. Thanks for your reply. I would like to replace term icons with “Default Listing Image” in the “GD > Popular Post Category widget” and the Popular Categories widget which I think may be fed by the same information (not 100% sure on that). I attached a screenshot. Areas labeled 1 and 2 in the green boxes I photoshopped in.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket