Forums

[Plugin: Add to Any: Share/Bookmark/Email Button] Add to Any picking up the wrong post (2 posts)

  1. nlaspf
    Member
    Posted 7 months ago #

    I installed the Add to Any plugin on a client's site. This site uses two loops on the index.php template, to display a "featured" post on the top part of the website, above the regular posts. This created a strange problem with the plugin:

    If I set it to add the button automatically, clicking on the button will take me to the Add to Any site where I can bookmark the post on any service (normal behavior). But if I hover on the button and use any link on the pop-up, it'll bookmark the previous post instead of the current one (say, Post #2 will bookmark Post #1).

    I managed to solve it adding the button manually, but I figured I'd mention the problem here, in case anyone else comes across it.

  2. micropat
    Member
    Posted 7 months ago #

    By adding the button manually, do you mean getting & inserting the code from addtoany.com?

    In almost all cases it's best to stick with the WordPress plugin, but due to the fact that it's picking up the wrong post in this case, this is probably an exception.

    The problem is likely that a function is calling the_content more than once, and thus addtoany is called too many times and in the wrong places. As the plugin author, I posted a topic about this unresolved issue with WP.

    Fortunately, this doesn't affect most themes, but we certainly want to support as many custom themes as possible.

Reply

You must log in to post.

About this Topic

Tags