• Resolved jeffreytay

    (@jeffreytay)


    Very nice plugin, thanks!

    I’m trying to make this work on a dynamically generated text that is generated by a short code.

    e.g. < pre >[some-short-code]< /pre >

    But i realise this doesn’t work.

    How to make it work? Thanks!

    • This topic was modified 5 years, 8 months ago by jeffreytay.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mahesh Waghmare

    (@mahesh901122)

    Hello,

    Can you please share the example. Or reference site. So I can check and let you know the possible solution.

    Thread Starter jeffreytay

    (@jeffreytay)

    thanks for reply! no worries – i managed to custom code it ??

    Plugin Author Mahesh Waghmare

    (@mahesh901122)

    Great!

    Still sharing the code snippet which helps for other users too.

    Copy below code and add into your child theme:

    
    /**
     * Enqueue 'Copy the Code' in wp-admin/backend area.
     * 
     * @todo Change the <code>prefix_</code> and with your own unique prefix.
     * 
     * @since 1.0.0
     */
    if( ! function_exists( 'prefix_enqueue_copy_the_code_in_admin' ) ) :
    	function prefix_enqueue_copy_the_code_in_admin() {
    		if( is_callable( 'Copy_The_Code_Page::get_instance' ) ) {
    			add_action( 'admin_enqueue_scripts', array( Copy_The_Code_Page::get_instance(), 'enqueue_assets' ) );
    		}
       	}
       	prefix_enqueue_copy_the_code_in_admin();
    endif;
    

    Gist URL for reference – https://gist.github.com/6d102a3d6dbda0c9388fb5caa498c43c

    Thread Starter jeffreytay

    (@jeffreytay)

    Ah ok thanks for that. I actually coded the entire click-to-copy functionality from scratch LOL.

    Hi Mahesh, can I join in this conversation?
    I have the same problem as jeffreytay..
    I should insert this shortcode:
    [crp_referral_link]

    It brings up a different link for each user.
    when you click on copy and then paste the result is this:
    <fieldset><code>https://www.greenhope.it/blog?ref=RIMNLL8</code></fieldset>

    In practice, in addition to copying the link, are also copied the elements:
    <fieldset><code> links... </code></fieldset>

    I would like only the link to be copied.

    I state that I don’t have a childe theme. Is there a alternative way? Could you help me please?

    Thanks in advance
    Marco

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to use shortcode inside ?’ is closed to new replies.