Change category icons on detail page
This topic contains 17 replies, has 3 voices, and was last updated by Kor 6 years, 10 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: detail page, Icons
-
AuthorPosts
-
January 2, 2018 at 2:34 pm #411205
Hello,
I want to change place category icons on detail page with function wich checks if default icon is there and then change it with custom icon for every specific category, but doesn’t work:
i try:
add_filter('sd_details_output_cat_links', 'custom_sd_details_output_cat_links'); function custom_sd_details_output_cat_links($cat_links) { if (file_exists ("<img src='http://dev.zadomace.si/wp-content/uploads/2017/10/zelenjava.png'>")) { return "<img src='http://dev.zadomace.si/wp-content/uploads/2017/10/kategorije/zelenjava.png'>"; } }
Can you please help?
Thanks, T
January 2, 2018 at 2:55 pm #411207Hi Tilen,
Thanks for reaching us. Sorry, I’m not really sure what are you trying to achieve there. You should be able to change the category icons directly in the “Places Categories” as shown in the attached screenshot. Is this what you’re looking for?
Thanks!
January 2, 2018 at 3:19 pm #411211Hello,
on plage category I can change default image of category and icons, but I want to change icons only on detail page with custom icons.
Thanks for help, T
January 2, 2018 at 4:39 pm #411217Hi Tilen,
Thanks for your reply. Yes, this would require customization. However, upon inspecting my test site, it looks like you can manipulate it using custom CSS. Here are some hints. Try targeting the post id if you wish to have different category icons on different listings.
.sd-detail-cat-links img { display:none!important; } .sd-detail-cat-links { background-image: url("https://wpgeo.directory/supreme-directory/wp-content/uploads/sites/5/2017/01/hotel1-1.png"); background-size:cover; background-repeat: no-repeat; width: 50px; height: 50px; }
January 2, 2018 at 4:59 pm #411222Hello,
thanks for help, I will try.
T
January 2, 2018 at 6:32 pm #411225Hello,
i can’t find way to change css for specific place category id:
Some examples for cat ID = 7:
.sd-detail-cat-links #7 {} .sd-detail-cat-links id-7 {} .sd-detail-cat-links cat-7 {}
Thanks for help,
TJanuary 2, 2018 at 8:40 pm #411234Hello!
Can you clarify what you are trying to do?
It sounds like you want to change all the category icons that are visible on the detail page.
Is that right?
If there are 5 categories, do you then want to change the image for each of the 5 different categories?
Or do you want all 5 to have the same image?January 3, 2018 at 8:52 am #411268Hello,
yes, I want to change category icons only on detail page below the address with custom icons.
I want to change every category icon with custom icon.
Thanks for help,
T
January 3, 2018 at 9:00 am #411270Hi Tilen,
If possible, could you share a detail listing page? I’ll try to work out an example for you. You can use the private reply option below.
Thanks!
January 3, 2018 at 9:23 am #411277Hello,
I was edited private post but now doesn’t shows it. Did you get private message?
Thanks for answer,
T
January 3, 2018 at 9:36 am #411278This reply has been marked as private.January 3, 2018 at 10:03 am #411283This reply has been marked as private.January 3, 2018 at 2:08 pm #411315Hi Tilen,
Just checked your Website and it looks like it’s not possible to achieve this using custom CSS. I’ve already informed a developer and he will check this out tomorrow for you.
Thanks!
January 3, 2018 at 2:19 pm #411317Hello,
thanks for answer, I find this part of code in geodirectory-compatibility.php and try to achieve this with php filter to check and change category images only on that part of site, but it doesn’t work.
Thanks for help,
T
January 3, 2018 at 2:31 pm #411318Hello!
We have looked into this. We are working towards several related features in V2, and for now we have a filter that you can use:
apply_filters('geodir_get_term_icons', $terms_icons, $term_id);
You will need to write your own customization to make use of that filter to switch the category icons.
Let us know how it goes, and if you need to hire an expert check out https://geodirectoryexperts.com
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket