a2a share the wrong URL in the loop
-
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
The topic ‘a2a share the wrong URL in the loop’ is closed to new replies.