WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Share Buttons by Lockerz / AddToAny] BUG?? – Page URLs cannot be shared

[Resolved] [Plugin: Share Buttons by Lockerz / AddToAny] BUG?? – Page URLs cannot be shared

  • I hacked a work around so a page URL can be shared, or a post, whichever was active. Now I have installed the latest update which wiped all the code – and am back to square one where no page URLs can be shared.

    Will someone please help with this? I have asked this question on the previous version but no one responded.

    My home page is not shared. The URL that is shared from my home page is the first post in the recent posts section. With any gallery page or blog page etc, the page is not shared, only the URL to the first post listed.

    http://wordpress.org/extend/plugins/add-to-any/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Would someone at least direct me to where I can get help on this question – please??

    Plugin Author micropat

    @micropat

    Can you point us to your site for context?

    We’d need to know exactly how you’re trying to implement and how you’ve already implemented the plugin. In particular, have you seen the plugin FAQ “How can I add both the button and the individual icons to another area of my theme?”?

    Thanks Micropat,

    my website is: http://www.garymartinphotography.co.nz

    currently if you click the share/save button, it is the homepage that will be shared which is what I want, same with any other page or gallery or category.

    Initial installation would only share the first post or image on any page or gallery and in the case of my home page it was the first of the recent posts section that was shared, not the home page.

    I any gallery listing, it was only the first image URL of the gallery that was shared, not the gallery.

    I have tried different settings in dashboard like page and post position settings etc but these made no difference either.

    I installed and activated using only the dashboard settings.

    The only way I could get my home page to be shared, or any gallery (category) to be shared was the code I posted in a previous post on this forum.

    Thanks.

    PS using Wp 3.3.1

    I have now reverted to the original default installation so you can see first hand what I am meaning.

    On the home page, the shared item is not the home page, but the first of the recent posts below the share button.

    On any other page the shared item is not the page, but the first image on that page only.

    None of the pages or categories can be shared.

    I asked this question and showed the code here a few weeks back:

    support/topic/plugin-addtoany-sharebookmarkemail-buttons-will-not-use-page-url

    Sorry I am going to have to change it back now, this is a live site and I want the sharing to be working propery.

    Plugin Author micropat

    @micropat

    Actually caught a glimpse earlier today and saw what you meant. I have an implementation suggestion that will probably work well with your theme but it requires a plugin update on our end to resolve a possible bug.

    Alongside the next foreseeable plugin update, you’ll want to disable the automatic button placement (Settings > AddToAny) and then hardcode the following PHP “template tag” into the appropriate theme files:
    <?php if( function_exists('ADDTOANY_SHARE_SAVE_KIT') ) { ADDTOANY_SHARE_SAVE_KIT(); } ?>

    This is documented in the FAQ “How can I add both the button and the individual icons to another area of my theme?”:
    http://wordpress.org/extend/plugins/add-to-any/faq/

    Right now the above PHP template tag has a possible bug in that it shares the 1st listed post URL on the page instead of the current URL as intended. Will look into modifying (fixing, I think) this for the next plugin release.

    Thanks, I really like plugin – working well for now, look forward to the update.

    Plugin Author micropat

    @micropat

    Turns out the functionality already exists! It just wasn’t documented yet. 🙂 With the instructions in my last post, use the following code instead (where array("use_current_page" => TRUE) is what forces the current page to be shared):

    <?php if( function_exists('ADDTOANY_SHARE_SAVE_KIT') ) { ADDTOANY_SHARE_SAVE_KIT( array("use_current_page" => TRUE) ); } ?>

    Technical note: Ideally the ADDTOANY_SHARE_SAVE_KIT function would detect whether or not it’s inside The Loop, but a core WordPress limitation makes that impossible (or really difficult) right now.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] [Plugin: Share Buttons by Lockerz / AddToAny] BUG?? – Page URLs cannot be shared’ is closed to new replies.