WordPress.org

Ready to get started?Download WordPress

Forums

Share Buttons by AddToAny
[resolved] Specify the correct URL for sharing (2 posts)

  1. webtomeasure
    Member
    Posted 3 months ago #

    In archive pages I am finding that the URL of the last archive item is being shared rather than the URL of the archive page. How do I specify the correct URL to be shared? I am using the call

    <?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) { ADDTOANY_SHARE_SAVE_KIT(); } ?>

    I was wondering can I specify the correct URL somehow in that call?

    https://wordpress.org/plugins/add-to-any/

  2. micropat
    Member
    Plugin Author

    Posted 3 months ago #

    Yes you can. From the FAQ:

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

Reply

You must log in to post.

About this Plugin

About this Topic