Skip to content

Instantly share code, notes, and snippets.

@laflier
laflier / gist:6dbba74fcf3ac821c9f7
Created July 1, 2014 12:41
Function for Genesis to display AddThis Sharing at Hook Location
add_action( 'COPY HOOK HERE', 'custom_addthis_share_buttons', 15 );
// See http://support.addthis.com/customer/portal/articles/381238-addthis-toolbox
// See also http://wpsites.net/best-plugins/addthis-social-share-follow-buttons-for-wordpress/
function custom_addthis_share_buttons() {
echo '<div class="addthis_toolbox addthis_default_style">';
echo '<a class="addthis_button_preferred_1"></a>';
echo '<a class="addthis_button_preferred_2"></a>';
echo '<a class="addthis_button_preferred_3"></a>';
@laflier
laflier / remove_addthis
Created June 10, 2014 23:17
Removes AddThis from bbPress topics and forums
/** Edited version of https://gist.github.com/aaronjorbin/2577395
* Removes AddThis from bbPress topics and forums
* Place in your theme's functions.php file
*/
add_filter('addthis_post_exclude', 'at_cookbook_addthis_bbpress_topic_exclude');
function at_cookbook_addthis_bbpress_topic_exclude($display)
{
// remove AddThis from topic post types in bbpress
if ( ( 'forum' == get_post_type() ) || ( 'topic' == get_post_type() ) ) {