Social Warfare Shortcode in Detail page

This topic contains 11 replies, has 3 voices, and was last updated by  Stiofan O’Connor 6 years, 1 month ago.

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

Open Support Ticket
  • Author
    Posts
  • #415087

    eic2010
    Full Member
    Post count: 209

    Hi
    I am using the social warfare plugin and at the moment it is installing the share buttons at the borrom of the profile and above the more info. Ideally I would like them to show below the map at the bottom. I have a shortcode for the buttons but where would I need to place this?
    Thanks in advance!

    #415182

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    Shortcodes are enabled for the Description field, so you can easily place them there and they will function properly.

    If you want to customize your site, you can try to add a new widget area. Once you have created the widget area, you can then enable shortcodes in widget areas with some custom PHP, and finally add your shortcode to the widget area. A GD expert could help you get that done: https://geodirectoryexperts.com

    #419259

    eic2010
    Full Member
    Post count: 209

    Thanks, is there a way it could be done with code snippets?

    #419315

    Alex Rollin
    Moderator
    Post count: 27815
    #422124

    eic2010
    Full Member
    Post count: 209

    Hi
    I tried
    add_action(‘geodir_after_tab_content’,’_my_tab_content_after’);
    function _my_tab_content_after($tab){
    if($tab== ‘post_map’){
    echo ‘[social_warfare]’;
    }
    }
    but it just broke my site. Is there something obvious I’m obviously missing?!!

    #422188

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    I will flag your question for the developers

    #422233

    eic2010
    Full Member
    Post count: 209

    Thanks, appreciate your help

    #422249

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    The snippet above looks right (not tested) but you would need to do
    echo

    do_shortcode('[social_warfare]');

    Stiofan

    #422258

    eic2010
    Full Member
    Post count: 209

    Thanks for getting back to me. I’ve tried
    add_action(‘geodir_after_tab_content’,’_my_tab_content_after’);
    function _my_tab_content_after($tab){
    if($tab== ‘post_map’){
    echo do_shortcode(‘[social_warfare]’);
    }
    }
    but my site still breaks and shows a 500 error?
    I’d like it under the ‘get directions’ of the map.

    #422344

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    that is the right code, i just tested it and it works, make sure the quotes are not the curly ones, try copy/paste from below:

    
    
    add_action('geodir_after_tab_content','_my_tab_content_after_x');
    function _my_tab_content_after_x($tab){
        if($tab== 'post_map'){
            echo do_shortcode('[social_warfare]');
        }
    }

    Stiofan

    #423376

    eic2010
    Full Member
    Post count: 209

    Thanks Stiofan! That worked, really appreciate your help, thank you again!

    #423478

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    You are welcome!

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