• Resolved G. Andore

    (@alvie90s)


    Team, I am trying to add more buttons to ‘Follow’ I’ve already added one and it worked fine with Extension Snippet as recommended. However I want to add more Follow buttons like Myspace, Hi5, Blogger, etc.. how can I add more? I tried to duplicate the code or add anew snippet but it says there is an error. Please tell me what to do, find below my current code that works fine, and provide me with the one I need to add to add more buttons to follow. Many Thanks!


    function addtoany_add_follow_services( $services ) {
    $services[‘example_follow_service’] = array(
    ‘name’ => ‘Ameba’,
    ‘icon_url’ => ‘https://s19.postimg.org/xfjap7mtf/246x0w.jpg’,
    ‘icon_width’ => 32,
    ‘icon_height’ => 32,
    ‘href’ => ‘hhttps://ameblo.jp/gamersoundradio/’,
    );
    return $services;
    }
    add_filter( ‘A2A_FOLLOW_services’, ‘addtoany_add_follow_services’, 10, 1 );

    The page I need help with: [log in to see the link]

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

    (@micropat)

    function addtoany_add_follow_services( $services ) {
        $services['example_follow_service_1'] = array(
            'name'        => 'Example Follow Service 1',
            'icon_url'    => 'https://www.example.com/my-icon.svg',
            'icon_width'  => 32,
            'icon_height' => 32,
            'href'        => 'https://www.example.com/${id}',
        );
        $services['example_follow_service_2'] = array(
            'name'        => 'Example Follow Service 2',
            'icon_url'    => 'https://www.example.com/my-icon.svg',
            'icon_width'  => 32,
            'icon_height' => 32,
            'href'        => 'https://www.example.com/${id}',
        );
        $services['example_follow_service_3'] = array(
            'name'        => 'Example Follow Service 3',
            'icon_url'    => 'https://www.example.com/my-icon.svg',
            'icon_width'  => 32,
            'icon_height' => 32,
            'href'        => 'https://www.example.com/${id}',
        );
        return $services;
    }
    add_filter( 'A2A_FOLLOW_services', 'addtoany_add_follow_services', 10, 1 );
    Thread Starter G. Andore

    (@alvie90s)

    Hey, sorry for reopening this ticket again. For some reason (i didn’t change anything) the custom social icons and data were working fine but now it is not working and it looks like broken links. Take a look how it looks on screenshot. Also find below my code.

    download

    function addtoany_add_follow_services( $services ) {
    $services[‘example_follow_service’] = array(
    ‘name’ => ‘Ameba’,
    ‘icon_url’ => ‘https://s19.postimg.org/xfjap7mtf/246x0w.jpg’,
    ‘icon_width’ => 32,
    ‘icon_height’ => 32,
    ‘href’ => ‘Amebo Profile’,
    );
    $services[‘example_follow_service_2’] = array(
    ‘name’ => ‘Blogger’,
    ‘icon_url’ => ‘https://s19.postimg.org/ew1c0pwbn/blogger.png’,
    ‘icon_width’ => 32,
    ‘icon_height’ => 32,
    ‘href’ => ‘Blooger ID’,
    );
    $services[‘example_follow_service_3’] = array(
    ‘name’ => ‘ok.ru’,
    ‘icon_url’ => ‘https://s19.postimg.org/isuse0xoz/odnoklassniki-icon.png’,
    ‘icon_width’ => 32,
    ‘icon_height’ => 32,
    ‘href’ => ‘Ok.ru’,
    );
    return $services;
    }
    add_filter( ‘A2A_FOLLOW_services’, ‘addtoany_add_follow_services’, 10, 1 );

    • This reply was modified 6 years, 11 months ago by G. Andore.
    Plugin Author micropat

    (@micropat)

    The site you’re using for the icon images (postimg.org) no longer exists, so just replace your icon URLs.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add more than 1 button to ‘Follow’’ is closed to new replies.