• Resolved zecke

    (@zecke)


    Hi

    Great plugin. Thank You for creating it ??

    Is there is any chance that after clicking and copying text it will take user to specified thank You page ?

    I mean some sort of URL redirection after clicking ?

    Thank You for Your answer

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter zecke

    (@zecke)

    I found answer by myself.

    Just add this Javascript into the footer of Your webpage:

            <script type="text/javascript">
    document.querySelectorAll('.wp-block-quote').forEach(item => {
      item.addEventListener('click', event => {
        setTimeout(() => {
          window.location.href = 'https://example.com'
        }, 1000)
      })
    })
    </script>
    

    It will redirect user to example.com after with 1 second delay ??

    Plugin Author Mahesh Waghmare

    (@mahesh901122)

    Hello @zecke,

    Thank you for your request.

    I have add such support into the latest plugin.

    You can use the filter copy_the_code_localize_vars to redirect user to any page.

    Please use code snippet and change the URL as you want:

    
    if ( ! function_exists( 'prefix_copy_the_code_localize_vars' ) ) :
    	/**
    	 * Localize vars.
    	 *
    	 * @return array
    	 */
    	function prefix_copy_the_code_localize_vars( $args = array() ) {
    
    		// Redirect to page url.
    		$args['redirect_url'] = 'https://maheshwaghmare.com/';
    
    		return $args;
    	}
    	add_filter( 'copy_the_code_localize_vars', 'prefix_copy_the_code_localize_vars' );
    
    endif;
    

    Fore more details please visit https://wp.me/P4Ams0-aAq

    Thread Starter zecke

    (@zecke)

    Hello Mahesh

    Wow. Thank You. Where should I paste this code ?

    All the best
    Zecke

    Plugin Author Mahesh Waghmare

    (@mahesh901122)

    Ah! I forget to mention about that.

    You can add that code into the child theme.

    I’ll update the article with detailed instructions.

    Thread Starter zecke

    (@zecke)

    Thanks. I`m waiting for an update ??

    Thread Starter zecke

    (@zecke)

    Hi

    I tried it to figure out on my own by pasting it in “functions.php”, but it does not work. I need Your help ??

    Plugin Author Mahesh Waghmare

    (@mahesh901122)

    Hello @zecke,

    Do you have updated to latest plugin version?

    I need some more details about what you have did so, we’ll discuss though email.

    Please send an email from https://maheshwaghmare.com/say-hello/

    Thread Starter zecke

    (@zecke)

    Now it`s working. All You need to do is paste the code in Your “functions.php” and change destination url ??

    Thank You for your useful plugin

    Is there any chance that after clicking and copying text

    after 3sec redirect user to any site.
    and we can change that site url to multi site.

    I mean we can use the filter to change Both text and site

    Plugin Author Mahesh Waghmare

    (@mahesh901122)

    Hello @mohammadpoor

    So, you mean you want a x seconds delay and the filter to change the destination URL?

    If yes, then please share more details of what exactly you want to do along with the current implementation on your website.

    So, I’ll take a look understand the requirement and provide you some solution with by releasing an update or maybe by providing some custom snippet for you.

    If there is any sensitive information then feel free to send the details in email [email protected]

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Go to ThankYou page after clicking’ is closed to new replies.