Logo – Custom Field – Add Listing

This topic contains 10 replies, has 3 voices, and was last updated by  Giri 8 years, 11 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #204276

    BJ Bowen
    Full Member
    Post count: 73

    I added a custom field for users to upload a logo. (http://www.dev1.foundation96.com/places/north-carolina/williamston/acupuncturists/miles-healthy-choice/)

    You can see this logo at the top of the left sidebar.

    Is there a way to turn off the pop-up functionality of the image in the custom field, in this example the logo, in the admin? I just want the image to display there.

    #204277

    BJ Bowen
    Full Member
    Post count: 73
    This reply has been marked as private.
    #204316

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    no there is no option to disable the lightbox effect (that in your website isn’t working for some reason).

    I asked to the developers if there is a quick code snippet that can be used to filter out the link and make it a flat image.

    They’ll let you know asap.

    Thanks

    #204340

    BJ Bowen
    Full Member
    Post count: 73

    There was a setting to turn the pop-up off and I did that before i wrote to you… that’s why the lightbox isn’t working now. I was hoping that it would fix my problem. But, the image is still a link to a url… soooo… hmmm. I was hoping there was another checkbox that I just wasn’t seeing.

    #205976

    Giri
    Expired Member
    Post count: 3155

    I have added this code in your child theme functions.php file. Your logo doesn’t have link now.

    
    
    function gd_strip_link_from_biz_logo($html) {
    	$html = preg_replace('/<a href="(.*?)">(.*?)</a>/', "\2", $html);
    	return $html;
    }
    add_filter('geodir_show_geodir_gd_bus_logo', 'gd_strip_link_from_biz_logo');
    
    #205983

    BJ Bowen
    Full Member
    Post count: 73

    That’s great! Now, if it could show the whole logo, not cropped inside a box. And if the words: “Upload your logo” could also not be visible, that would be ideal.

    When I tried to remove the words, they were also removed on the add-listing page.

    Thank you for your help.

    #205986

    Giri
    Expired Member
    Post count: 3155

    Done

    Here is the modified code

    
    
    function gd_strip_link_from_biz_logo($html) {
    	global $post;
    	//$html = preg_replace('/<a href="(.*?)">(.*?)</a>/', "\1", $html);
    	$html = '<img src="'.$post->geodir_gd_bus_logo.'" class="gd_bus_logo_img" alt="" />';
    	return $html;
    }
    add_filter('geodir_show_geodir_gd_bus_logo', 'gd_strip_link_from_biz_logo');
    
    #205991

    BJ Bowen
    Full Member
    Post count: 73

    you’re an effin’ genius! Can I ask one more thing about the other labels.

    In the same sidebar, you’ll see “Office Street Address” and “Phone” labels. I don’t want those labels to show up either. Just the icon and then the info. Can you change that without it disappearing from the Add-Listings page?

    Thank you!

    #205995

    Giri
    Expired Member
    Post count: 3155

    Icons are inside the span text. So you can either display both icon and label or hide both.

    This is the code i used in GeoDirectory > Design > Scripts > Custom style css code

    Remove it if you want to display them

    
    
    .geodir-sidebar-wrap .geodir-i-location,
    .geodir-sidebar-wrap .geodir-i-contact { display:none; }
    #206014

    BJ Bowen
    Full Member
    Post count: 73

    That’ll be fine… not ideal, but fine. I can’t express my appreciation enough. You have been fantastic. I hope everyone is as good to you as you have been to me. Thank you.

    #206024

    Giri
    Expired Member
    Post count: 3155

    You are welcome 🙂

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

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

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount