• Resolved rajatixigo

    (@rajatixigo)


    Hi,
    I need to append some query params in the Target URL when share button is clicked.
    How can I do that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Heateor Support

    (@heateor)

    Hi there,

    You can use following code as a separate plugin or add it to the functions.php file of your active theme to add querystring param to the url being shared:

    /**
     * Add querystring parameter to the url being shared
     */
    function heateor_sss_querystring_param( $post_url, $sharing_type, $standard_widget ) {
    	return strpos( $post_url, '?' ) !== false ? $post_url . '&test=1' : $post_url . '?test=1';
    }
    add_filter( 'heateor_sss_target_share_url_filter', 'heateor_sss_querystring_param', 10, 3 );

    Replace “test=1” with the querystring param of your choice.

    Thread Starter rajatixigo

    (@rajatixigo)

    Hi Team,

    Thanks for your quick support, it worked like a charm.

    Plugin Author Heateor Support

    (@heateor)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to append Query params in Target url’ is closed to new replies.