Title: Adding query string to url
Last modified: August 30, 2016

---

# Adding query string to url

 *  Resolved [angelinazooma](https://wordpress.org/support/users/angelinazooma/)
 * (@angelinazooma)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/adding-query-string-to-url-1/)
 * I’m trying to get the plugin to share the url with a query string but I guess
   I’m doing it wrong.
 * example url I’m trying to share: [http://example.com/expand/?list=123](http://example.com/expand/?list=123)
 * I’ve got this in my wordpress template. I tried just before and just after the_content()
 *     ```
       <script>
       var addthis_share = {
            url_transforms : {
                add: {
                    list: '123'
                }
            }
       }
       </script>
       ```
   
 * but it’s not changing the share’s urls at all
 * [https://wordpress.org/plugins/addthis/](https://wordpress.org/plugins/addthis/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [addthis_matt](https://wordpress.org/support/users/addthis_matt/)
 * (@addthis_matt)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/adding-query-string-to-url-1/#post-6557470)
 * Hi there,
 * The addthis_share.url_transforms variable should still work. Do you have an example
   page where I can investigate the issue further?
 * Thanks,
    Matt AddThis Support
 *  Thread Starter [angelinazooma](https://wordpress.org/support/users/angelinazooma/)
 * (@angelinazooma)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/adding-query-string-to-url-1/#post-6557475)
 * Is there somewhere I can email this? I’d rather not post it online if possible..
   You can email me at ag113 @ hotmail.com if that is easier for you
 * thanks!
 *  Thread Starter [angelinazooma](https://wordpress.org/support/users/angelinazooma/)
 * (@angelinazooma)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/adding-query-string-to-url-1/#post-6557477)
 * wait.. just noticed I can edit this post.. here’s the link, I’ll delete it when
   we’re done 🙂
 * ((link removed))
 *  Plugin Author [addthis_matt](https://wordpress.org/support/users/addthis_matt/)
 * (@addthis_matt)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/adding-query-string-to-url-1/#post-6557484)
 * It looks like the script you added to the template is appearing before the WordPress
   plugin adds a second instance of addthis_share, which is therefore overriding
   the instance of addthis_share you’ve added.
 * The easiest way to get around that would be to add the addthis_share JSON directly
   into the Advanced Settings tab within the AddThis Sharing Buttons plugin.
 * Once you’re on the Advanced Settings tab, look for:
    “addthis_share values (json
   format)”
 * > [View post on imgur.com](https://imgur.com/TbCVV7y)
 * You’d need to add the json with quotes, like this:
    { “url_transforms” : { “add”:{“
   list”: “123” } } }
 * Once you save the changes, the URL parameters should be added to the shares.
 *  Thread Starter [angelinazooma](https://wordpress.org/support/users/angelinazooma/)
 * (@angelinazooma)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/adding-query-string-to-url-1/#post-6557487)
 * ahhh.. ok that actually leads me to different solution which works for me
 * I actually have 2 different templates that I need to have a specific url, but
   a different specific url
 * so in the footer after wp_footer() I’m checking for the page id, and then putting
   the correct version of the script above
 * thanks!
 *  Plugin Author [addthis_matt](https://wordpress.org/support/users/addthis_matt/)
 * (@addthis_matt)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/adding-query-string-to-url-1/#post-6557488)
 * No problem at all! Let us know if you have any further questions and we’ll be
   glad to help.
 *  Thread Starter [angelinazooma](https://wordpress.org/support/users/angelinazooma/)
 * (@angelinazooma)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/adding-query-string-to-url-1/#post-6557587)
 * actually looks like it isn’t quite solved…
 * The facebook share is ignoring the new url and just using the one without the
   query string.
 * I’ve made sure the canonical link for the page is the version with the query 
   string (I’ve seen this be an issue before) but that didn’t help either.
 *  Thread Starter [angelinazooma](https://wordpress.org/support/users/angelinazooma/)
 * (@angelinazooma)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/adding-query-string-to-url-1/#post-6557589)
 * I’ve been playing around with filtering out some of the open graph meta that’s
   inserted into the head via SEO Yeost.
 * this might have fixed the problem but I can’t be sure yet. One of the 2 pages
   seems to be functioning properly with the Facebook link but the other doesn’t
   which might just been Facebook hasn’t quite caught up yet with the changes that
   were made.
 *  Plugin Author [addthis_matt](https://wordpress.org/support/users/addthis_matt/)
 * (@addthis_matt)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/adding-query-string-to-url-1/#post-6557594)
 * Hi there,
 * It looks like the og:url was previously set to a different URL and Facebook had
   it cached. Now that the og:url meta tag is removed, I performed a new “fetch”
   using Facebook’s Debugger, which now results in the correct URL being shared.
   If you need to do this for any other URLs, here’s the link to Facebook’s Debugger:
 * [https://developers.facebook.com/tools/debug/og/object/](https://developers.facebook.com/tools/debug/og/object/)
 *  Thread Starter [angelinazooma](https://wordpress.org/support/users/angelinazooma/)
 * (@angelinazooma)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/adding-query-string-to-url-1/#post-6557597)
 * yeah, that’s the stuff! Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Adding query string to url’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/addthis_70cced.svg)
 * [WordPress Share Buttons Plugin – AddThis](https://wordpress.org/plugins/addthis/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/addthis/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/addthis/)
 * [Active Topics](https://wordpress.org/support/plugin/addthis/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/addthis/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/addthis/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [angelinazooma](https://wordpress.org/support/users/angelinazooma/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/adding-query-string-to-url-1/#post-6557597)
 * Status: resolved