WordPress.org

Ready to get started?Download WordPress

Forums

Share Buttons by AddToAny
[Plugin: AddToAny: Share/Bookmark/Email Buttons] Will not use page URL (1 post)

  1. garylmartin
    Member
    Posted 2 years ago #

    Hi,

    the share URL is always and only the first post on any page or category listing, it will not use the page or category URL.

    There is a variable in add-to-any.php that I can find no other reference to or where this variable is set = $use_currentpage

    I have changed the following in add-to-any.php :

    // If not a feed
    if( ! $is_feed ) {
    if ($use_currentpage) {
    $_addtoany_targets[] = "\n{title:document.title,"
    . "url:location.href}";
    } else {

    To:

    $is_front_page = is_front_page();
    $is_category = is_category();

    // If not a feed
    if( ! $is_feed ) {
    if ($is_front_page || $is_category) {
    $_addtoany_targets[] = "\n{title:document.title,"
    . "url:location.href}";
    } else {

    This seem to work of for now.

    Gary.

    http://wordpress.org/extend/plugins/add-to-any/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags