Supreme Social Media

This topic contains 11 replies, has 3 voices, and was last updated by  Stiofan O’Connor 7 years, 2 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #393566

    Joy
    Buyer
    Post count: 1076

    Hi guys, on the listing details page, right below the name and location, it only shows an icon/link for a website, twitter, facebook, and hone number. How do I add instragram to the list?

    https://wpgeo.directory/supreme-directory/places/united-states/california/san-francisco/restaurants/tasty-food-inc/

    I have been able to add it on the place details, but it only appears in the sidebar, tabs, etc. I would like it to appear with the rest of the links for uniformity. Thank you.

    #393672

    Kor
    Moderator
    Post count: 16516

    Hi Joy,

    It’s not possible without customization. But I’ll forward this to a developer for a second opinion.

    Thanks!

    #393675

    Joy
    Buyer
    Post count: 1076

    Thank you, but I believe that post is for an additional social sharing option.

    I’m looking to add an additional listing detail link (right below the title, with the small website, Facebook, and phone links). Currently, if I add an Instagram link for the detail page it doesn’t show up with the rest of the icons, but can be shown on the sidebar. I’d like to place it with the icons just like the Facebook icon appears, directly below the listing title.

    Please tell me if you need a screenshot. Thank you.

    #393676

    Joy
    Buyer
    Post count: 1076

    Oh wait, I guess you edited your previous response. I’ll await an update from the developer.

    Thank you.

    #393715

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Joy,

    Sorry i think @kor misunderstood.

    Just add a url custom field and set the “default value” to “Instagram” then under the “Upload Icon” enter “fa fa-instagram”. That is all 🙂

    Thanks,

    Stiofan

    #393721

    Joy
    Buyer
    Post count: 1076

    Hi Stiofan,

    I’ve done this setup before to have it appear in the sidebar. But I am now using the Supreme theme, and am trying to get the social icon/link show up under the listing title, not on the sidebar.

    This doesn’t seem to achieve that.

    #393744

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Looks like we both misread the question 🙁

    If you named your custom field html “instagram” then this code will add it:

    
    
    add_filter('sd_details_output_social','_my_extra_social_details',10);
    function _my_extra_social_details($output){
    	global $post;
    
    	if(isset($post->geodir_instagram) && $post->geodir_instagram){
    		$output = str_replace('<div class="sd-contacts">','<div class="sd-contacts"><a rel="nofollow" target="_blank" href="' . esc_url($post->geodir_instagram) . '"><i class="fa fa-instagram"></i></a>',$output);
    	}
    	return $output;
    }

    Thanks,

    Stiofan

    #393834

    Joy
    Buyer
    Post count: 1076

    Thank you Stifoan.

    Any way that can be moved one spot over so it’s with the other social media links? Currently, it appears at the first link.

    Thank you.

    #393847

    Joy
    Buyer
    Post count: 1076

    Sorry, one more question. How do I change the default icons on the other links? I’ve scrolled through a ton of posts and i don’t see any requests for this in the past.

    Thank you.

    #393916

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Any way that can be moved one spot over so it’s with the other social media links? Currently, it appears at the first link.

    It makes it a lot more complicated but…

    
    
    add_filter('sd_details_output_social','_my_extra_social_details',10);
    function _my_extra_social_details($output){
    	global $post;
    
    	if(isset($post->geodir_instagram) && $post->geodir_instagram){
    
    if (strpos($output, 'fa-external-link-square') !== false) {
    $output = str_replace('fa-external-link-square"></i></a>','fa-external-link-square"></i></a><a rel="nofollow" target="_blank" href="' . esc_url($post->geodir_instagram) . '"><i class="fa fa-instagram"></i></a>',$output);
    }elseif (strpos($output, 'fa-facebook-official') !== false) {
    $output = str_replace('fa-external-link-square"></i></a>','fa-facebook-official"></i></a><a rel="nofollow" target="_blank" href="' . esc_url($post->geodir_instagram) . '"><i class="fa fa-instagram"></i></a>',$output);
    }elseif (strpos($output, 'fa-twitter-square') !== false) {
    $output = str_replace('fa-external-link-square"></i></a>','fa-twitter-square"></i></a><a rel="nofollow" target="_blank" href="' . esc_url($post->geodir_instagram) . '"><i class="fa fa-instagram"></i></a>',$output);
    }else{
    $output = str_replace('<div class="sd-contacts">','<div class="sd-contacts"><a rel="nofollow" target="_blank" href="' . esc_url($post->geodir_instagram) . '"><i class="fa fa-instagram"></i></a>',$output);
    }
    
    // replace some icons
    $output = str_replace('fa-facebook-official','fa-wordpress',$output);
    
    	}
    	return $output;
    }

    Stiofan

    #393919

    Joy
    Buyer
    Post count: 1076

    WOW! That’s really great of you to help me out with that. Thank you again so much.

    #393923

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    You are welcome Joy 🙂
    I think you might have left us a review already but if you have not please leave us a quick review, it helps us grow! 🙂
    https://wordpress.org/support/plugin/geodirectory/reviews/?rate=5#new-post

    Thanks,

    Stiofan

Viewing 12 posts - 1 through 12 (of 12 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