Support » Plugin: WP Social Sharing » Custom URL to share

  • Hello,

    I modified the file: wp-social-sharing/includes/class-public.php to allow custom Url to share.
    The reason of that: I put the social share plugin on my Thankyou page, I’d like the visits can share the original post instead the thankyou page.

    So included the parameter url on creation of plugin.

    
    if($atts['url'] == "")
    {
        $url = urlencode( get_permalink() );
    }
    else
    {
        $url = $atts['url'];
    }
    

    [wp_social_sharing url=’https://dootax.com.br’]

Viewing 2 replies - 1 through 2 (of 2 total)
  • KrissieV

    (@krissiev)

    Thank you so much for this! This is exactly what I was looking for. In my instance I’m putting the share button on the page where the member can edit their own profile, but want to share a link to their public profile.

    Hi!! thanks for share you code but i cant get to work this code on a custom woocomerce thank you page.

    i use this this class-public.php file, its this ok?
    https://gist.github.com/djcesar/20436bb186ca3341fdca332dcb179738

    and i use this snipet on the custom thank you page

    [wp_social_sharing url=’https://www.customurl.com’ social_options='facebook,twitter,googleplus,linkedin,pinterest' twitter_username='elefectocenici1' facebook_text='Compartir en Facebook' twitter_text='Compartir en Twitter' googleplus_text='Compartir en Google+' linkedin_text='Compartir en Linkedin' pinterest_text="Compartir en Pinterest" xing_text="Compartir en Xing" reddit_text="Compartir en Reddit" icon_order='f,t,g,l,p,x,r' show_icons='0' before_button_text='' text_position='' social_image='']

    Thank you in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.