• Resolved falbala2486

    (@falbala2486)


    Hi!
    I’m using Addtoany inside posts and it works perfectly, sharing the url of the post

    But I also set up share buttons inside grid items (each item refers to a single post ).
    Problem is that, when I click on the share button on a specific item in the grid, it shares the URL of the page. I would like to share the URL of the item clicked and not the url of the page.

    How can I achieve that? Thanks !

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author micropat

    (@micropat)

    Hi there,

    The AddToAny plugin is built to use the proper URL for each item in a list (or grid) of posts, so your site’s issue may be with the theme or plugin that handles your grids.

    Which grid theme and/or plugin are you using? Can you point to a live URL that shows the buttons within a grid?

    Thread Starter falbala2486

    (@falbala2486)

    Hi ! You can check the issue here https://www.fouiny.fr/

    Thank you !

    Plugin Author micropat

    (@micropat)

    Based on your awesome customization I’d recommend the following HTML & PHP code in your theme file(s):

    <div class="btn_act_for_grid">
    <a class="share_icon fa fa-share-alt"></a>
    <?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) { ADDTOANY_SHARE_SAVE_KIT(); } ?>
    </div>

    When you place the above code within The Loop in your theme file(s), AddToAny will use each post’s URL/title as expected.

    Thread Starter falbala2486

    (@falbala2486)

    Hi!
    Thanks for your quick reply ! Unfortunately, it didn’t make it.
    The code provided still shares homepage instead of each post’s url.

    Can you help me again please?

    Thank you

    Plugin Author micropat

    (@micropat)

    The HTML appears unchanged on your site. Make sure you clear your site cache(s) after removing your current HTML and switching to the above HTML/PHP code in your theme file(s).

    When your change is live and you View Source in your web browser, you will see the addtoany_list class name and important HTML attributes such as data-a2a-url. If you’re not seeing the class name and HTML attributes, your change isn’t live yet.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Multiple share links in a single page’ is closed to new replies.