Forums

Share Buttons by Lockerz / AddToAny
Will not use page URL (1 post)

  1. garylmartin
    Member
    Posted 4 months 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/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags