Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1079056
    nozziv
    Participant

    Hi

    The website is showcased for stack Integrity,

    How to have this option “social shares” activated (see images attached) ?

    1 – PAGE : http://www.gisidesign.com/creative-blog
    2 – POSTS : http://www.gisidesign.com/schluss-mit-dem-ideenklau

    Best regards,

    Michael

    #1079104
    Nabeel A
    Moderator

    Hi Michael,

    Thanks for writing in! Please add the following code in your Child Theme’s functions.php file:

    function share_for_individual_post( $content ) {
    	if ( is_singular('post') ) {
    		echo do_shortcode( '[share title="Share this Post" facebook="true" twitter="true" google_plus="true" linkedin="true" pinterest="true" reddit="true" email="true"]' );
    	}
    }
    add_action('x_before_the_content_end', 'share_for_individual_post');

    Let us know how this goes!

    #1079128
    nozziv
    Participant

    Thanks Nabeel, works great on Post, what about on PAGE (see point 1 on my previous message) ?

    1 – PAGE : http://www.gisidesign.com/creative-blog

    Best regards,

    Michael

    #1079143
    Christopher
    Moderator

    Hi there,

    Please update previous code to :

    // Social Sharing Buttons on Blog Posts
    // =============================================================================
    
    function share_for_posts( $content ) {
      if ( is_home() || is_singular('post') ) {
        echo do_shortcode('[share title="Title" facebook="true" twitter="true" google_plus="true" linkedin="true" pinterest="true" reddit="false" email="true"]');
      }
    }
    
    add_action('x_before_the_content_end', 'share_for_posts');
    add_action('x_before_the_excerpt_end', 'share_for_posts');

    Hope it helps.

    #1079175
    nozziv
    Participant

    Great! Thanks a lot Christopher.

    Have a nice day,

    Michael

    #1079176
    Nabeel A
    Moderator

    Glad we could help 🙂

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1079056 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>