Ready to get started?Download WordPress


Share Buttons by AddToAny
[resolved] Sharing wrong URL on homepage (3 posts)

  1. Andrew Rowland
    Posted 8 months ago #

    The buttons on the home page of http://3blindmiceusa.com are linking to the first blog article in the feed below the fold.

    Have tested on local copy of site and confirmed same thing is happening.

    Have verified in all browsers.

    Have debugged and everything is working fine from Facebook Developer debugger.

    Not sure why it is grabbing the blog post url instead of the page url. What can I do?

    I forgot to mention it is working just fine on the rest of the site.


  2. Andrew Rowland
    Posted 8 months ago #

    I still have not figured out why the normal template function is resulting in the wrong link on the homepage, but after some additional research I found I can use the following snippet to manually override the share URL for the homepage template.

    <?php if( function_exists('ADDTOANY_SHARE_SAVE_KIT') ) {
        ADDTOANY_SHARE_SAVE_KIT( array("linkname" => "Example Page", "linkurl" => "http://example.com/page.html") );
    } ?>
  3. micropat
    Plugin Author

    Posted 8 months ago #

    Oftentimes that's the best way to do it on the homepage. What placement method were you using before exactly?


You must log in to post.

About this Plugin

About this Topic