Make an option to add ShareThis / social media buttons in blog posts

This topic contains 4 replies, has 4 voices, and was last updated by  Paolo 8 years, 7 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #36146

    Holiday Monk
    Free User
    Post count: 23

    Hi,

    We can see ShareThis & social media sharing button on only geodirectory listings but to add on our blog posts we need to add a extra plugin. Since its already implemented in geodirectory plugin please make options for users to display the same buttons on either pages, blog posts, categories etc. This will surely help many of the geodirectory users. My idea is to make less use of third party plugins and thus reducing number of css and js. Already there are so many css and js files in geodirectory.

    And what if you implement site builder to geodirectory?

    #36152

    Guust
    Moderator
    Post count: 29970

    You can add your feature request to https://wpgeodirectory.com/requests/ if you like.

    Can you explain a bit better what you mean with site builder?

    #36164

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    you can try this code snippet for that:

    
    
    
    function my_add_post_content($content) {
     if('post' == get_post_type() && is_single()) {
    ob_start();
    geodir_share_this_button_code();
    $share = ob_get_clean();
      $content .= '<div class="share-after-posts"> ' . $share .'</div>';
     }
     return $content;
    }
    add_filter('the_content', 'my_add_post_content');

    Copy it in your theme functions.php file.

    Let us know,

    Thanks

    #56356

    iwoaw
    Expired Member
    Post count: 150

    Does not do the trick. I disabled the other share plugin and nothing shows at all.

    #56399

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    just tested here: http://wpgeo.directory/hello-world/

    Where are you expecting the social share to appear?

    Let us know,

    Thanks

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

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

Open Support Ticket