Title: QR code for current URL
Last modified: December 7, 2020

---

# QR code for current URL

 *  [strell](https://wordpress.org/support/users/strell/)
 * (@strell)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/qr-code-for-current-url-2/)
 * How can I create a custom service button to show the qrcode of the current url?
   
   I have the qrcode in a shortcode, have created a snippet to provide the button,
   but don’t know what to do with the href value. I don’t want to leave the website
   just show the qr code similar to the copy_link service button, but save the overhead
   of generating the code until someone selects it.
 * `function addtoany_add_share_services( $services ) {
    $services[‘qrcode_share_service’]
   = array( ‘name’ => ‘QRcode’, ‘icon_url’ => ‘[https://journey2.life/wp-content/uploads/qr.png&#8217](https://journey2.life/wp-content/uploads/qr.png&#8217);,‘
   icon_width’ => 32, ‘icon_height’ => 32, ‘href’ => ‘[qr_current_url]’, ); return
   $services; } add_filter( ‘A2A_SHARE_SAVE_services’, ‘addtoany_add_share_services’,
   10, 1 );
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fqr-code-for-current-url-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

The topic ‘QR code for current URL’ is closed to new replies.

 * ![](https://ps.w.org/add-to-any/assets/icon.svg?rev=972738)
 * [AddToAny Share Buttons](https://wordpress.org/plugins/add-to-any/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/add-to-any/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/add-to-any/)
 * [Active Topics](https://wordpress.org/support/plugin/add-to-any/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/add-to-any/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/add-to-any/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [strell](https://wordpress.org/support/users/strell/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/qr-code-for-current-url-2/)
 * Status: not a support question