AddToAny Share Buttons
[Plugin: AddToAny: Share/Bookmark/Email Button] Custom standalone imgs + urls (1 post)

  1. Wroth
    Posted 5 years ago #

    I want to have post to twitter and Share [not Like] on facebook through two standalone buttons using custom imgs for the buttons. I have these working fine on the post's pages, but would like to use these buttons on other pages as well.

    I want to share from within a lightbox pop-up on archive pages that have nothing to do with the link I want to share, so need to pass the the_permalink and the_title of the post the buttons belong to these custom standalone buttons instead of the page the buttons are located on.

    To top it off, I will have up to eight different sets of these buttons hidden together on a page at once waiting to popped-up individually, so I need to be sure that each button returns the right link.

    I have not found a way to do this for standalone links with the custom images? Any ideas?

    I saw the function for the plugin that calls standalone images with specific urls,

    if( function_exists('ADDTOANY_SHARE_SAVE_ICONS') ) {
        echo '<div class="a2a_kit addtoany_list">';
            "linkname" => "Example Page", "linkurl" => "http://example.com/page.html"
        echo '</div>';
    } ?>

    but that does not allow me to use custom images for the standalone buttons? Is there a way to define what imgs are used?

    I could try something like http://www.addtoany.com/buttons/customize/multiple_buttons_different_pages , but need to define a2a_button_twitter & a2a_button_facebook instead of a2a_dd. Standalones, not menus. Is there a way to do that? The code I have right now, which is not working at all because I am not calling a2a_dd, looks like

    <div class="a2a_kit">
    	<a class="a2a_button_twitter twitterbubble">
    		<img src="<?php bloginfo('stylesheet_directory'); ?>/img/slate-twitter.png" />
    <script type="text/javascript">
    	a2a_config.linkname = '<?php the_title(); ?>';
    	a2a_config.linkurl = '<?php the_permalink(); ?>';
    	a2a_config.templates = {twitter: "Check out ${title} ${link} by @snowmask"};
    <script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script>
    	<a class="a2a_button_facebook facebookbubble">
    		<img src="<?php bloginfo('stylesheet_directory'); ?>/img/slate-facebook.png" />
     <script type="text/javascript">

    Which get's repeated for each post. Ideally a solution would work along those lines.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • AddToAny Share Buttons
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic