• Resolved deepthi yamaka

    (@deepthi-yamaka)


    hi,
    i want to share a particular url or a static url from wherever these share buttons are placed. how to do that one?

    i had placed the php code “echo do_shortcode( ‘[wpusb]’ );” at the place that i want to show. but, on sharing, i think current url will come for sharing. but i want to share a static url which is predefined. is it possible? please tell me how to do that.

    thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Freitas Victor

    (@victorfreitas)

    Hi @deepthi-yamaka,

    You can use the shortcode so it will work.

    [wpusb url="https://website.com" title="Custom title"]

    On the plugin use options page there are examples of how to use the parameters via shortcode or PHP method.

    Thank you for feedback.

    Plugin Author Freitas Victor

    (@victorfreitas)

    Hi,

    New update available (3.25), with new options added and fixes.
    Now you can add the buttons via widget and customize url and post title.

    Thank you for feedback.

    Thread Starter deepthi yamaka

    (@deepthi-yamaka)

    Hi Victor Freitas,

    thank for reply,

    the above is working perfect for a static url. but, my url is being assigned to a variable. how can i use place it in php.

    i used the following code

    <?php echo do_shortcode( ‘[wpusb url=$refLink title=”custom title”]’ ); ?>

    i know its not the correct way, because its a shortcode. can you please tell how to give a variable as the linking url?

    thank you.

    Thread Starter deepthi yamaka

    (@deepthi-yamaka)

    hi Victor Freitas,
    i used the following code even..
    <?php echo do_shortcode( ‘[wpusb url=<?php echo $refLink; ?> title=”custom title”]’ ); ?>

    with this , it is taking the current url only while sharing.

    if i use
    <?php echo do_shortcode( ‘[wpusb url=$refLink title=”custom title”]’ ); ?>
    nothing is happening.

    please do reply, its kind of urgent

    thank you

    Plugin Author Freitas Victor

    (@victorfreitas)

    Hi @deepthi-yamaka,

    Use the code below that will work.

    if ( class_exists( 'WPUSB_Shares_View' ) ) :
    	$args = array(
    		'title' => '',
    		'url'   => $refLink,
    	);
        echo WPUSB_Shares_View::buttons_share( $args );
    endif;

    Thank you.

    Thread Starter deepthi yamaka

    (@deepthi-yamaka)

    hi victorfreitas,
    thankyou so much for ur reply.
    i used above code, and its working perfect. thnks again.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘how to share a fixed url?’ is closed to new replies.