[HUSTLE] Social Sharing shortcode in Embed + After Content

During the chat we were able to set up Social Sharing shortcode in Embed on test site. Embed was set up as After Content.
So, Social Sharing displayed at the end of each post. I need a guide on how to set up this correctly.
Thank you
Tomer

  • Kris Tomczyk

    Hi Tomer

    Hope you are doing good today.

    I apologize for the misunderstanding during the chat session.
    To have Social Sharing shortcode work in After Content you will need to follow those steps:

    1. create you social Social Sharing in Hustle -> Social Sharing and set it up like this:

    a) social share need to be active
    b) shortcode part need to be set up as Live

    2. log in to FTP or file manager and go to: /wp-content/ folder. Create there folder /mu-plugins/.
    Inside that folder create file custom_social.php (for ex., file name here is does not matter).
    Copy to this file this code:

    <?php
    function custom_post_title( $title ) {
      $title .= do_shortcode( '[wd_hustle id="social-share-01" type="social_sharing"]' );
      return $title;
    }
    add_filter( 'the_content', 'custom_post_title', 10, 2 );

    Then you social share will show after each post/page content.
    Of couse in above code replace:
    [wd_hustle id="social-share-01" type="social_sharing"]
    to your current social shortcode.

    Hope this help :slight_smile:

    Kind Regards,
    Kris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.