WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Add to Any Share/Save/Bookmark Button] Use in Sidebar? (4 posts)

  1. leocine2008
    Member
    Posted 5 years ago #

    Fairly new to this so pardon if the answer if obvious...
    can button be placed in sidebar? If so, how?

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

  2. micropat
    Member
    Posted 5 years ago #

    Hi,

    Directions are located within the plugin's settings panel located in Settings > Share/Save Buttons under Button Placement.

    Using your theme editor, place this line of code somewhere in your theme's sidebar file: <?php if( function_exists('ADDTOANY_SHARE_SAVE_BUTTON') ) { ADDTOANY_SHARE_SAVE_BUTTON(); } ?>

    Cheers!

  3. dreamwhisper
    Member
    Posted 4 years ago #

    Placing the code in the sidebar results in Add to Any picking up the wrong post. Any solution?

  4. micropat
    Member
    Posted 4 years ago #

    Hmm... that's a really good point. To be frank, the goal with this plugin is to help your visitors share and bookmark the current post, so the Share/Save button usually makes most sense within each post as opposed to the sidebar.

    If you'd like to explore sidebar functionality anyway, and assuming your sidebar is displayed on individual post pages, I would look into only displaying the button in the sidebar on individual post pages instead of the front page, categories, etc. You should be able to accomplish this by combining the aforementioned code with an is_single() condition like so:

    <?php if( is_single() && function_exists('ADDTOANY_SHARE_SAVE_BUTTON') ) { ADDTOANY_SHARE_SAVE_BUTTON(); } ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags