Support » Plugin: AddToAny Share Buttons » a2a share the wrong URL in the loop

  • Resolved DragoWeb

    (@dragoeco)


    Hi there,

    I use this shortcode to display the a2a share button in a custom loop page.

    <?php echo do_shortcode('[addtoany url="' . get_the_permalink() . '" title="' . get_the_title() . '"]') ?>

    The returned HTML is correct (the data-a2a-url shows the correct URL) but when I click for example on the share link button, it always share the first post displayed on the loop page. Same white Twitter, Facebook, etc. share buttons. I spend hours to find a solution but with no success, so that’s why I’m here.

    I have placed this shortcode in 2 different loop pages, one generate on the theme (Generatepress) and another one to a plugin (searchandfilter), so I guess the problem is not related to either of them.

    Do you have an idea where the problem comes from?

    Thanks,

    Pierre

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.