EA Share Count – Box Style

This styles the EA Share Count buttons like they are here on my site. Boxes without counts, and if you have “Included Total” field it shows the total shares

jQuery(function($){
// Move total share count number
$('.ea-share-count-wrap').each(function(){
var count = $(this).find('.ea-share-count-button.included_total');
if( count.length ) {
$(count).find('.ea-share-count').prependTo(count).css('display', 'block');
}
});
});
view raw global.js hosted with ❤ by GitHub
<?php
/**
* SharedCount Icons
*
*/
function be_sharedcount_icons( $link ) {
$link['class'] = 'style-box';
if( 'included_total' == $link['type'] ) {
$link['icon'] = '';
$link['label'] = 'Shares';
} else {
$link['count'] = '';
$link['label'] = '';
}
return $link;
}
add_filter( 'ea_share_count_link', 'be_sharedcount_icons' );
view raw sharing.php hosted with ❤ by GitHub
.ea-share-count-button.style-box {
background: #47403A;
color: #fff;
display: block;
float: left;
width: 36px;
height: 36px;
text-align: center;
line-height: 32px;
margin-right: 5px;
}
.ea-share-count-wrap .ea-share-count-button.style-box:last-child {
margin-left: 0;
}
.ea-share-count-button.style-box:hover {
opacity: .8;
}
.ea-share-count-button.style-box.facebook {
background: #395B9A;
}
.ea-share-count-button.style-box.twitter {
background: #51AEF0;
}
.ea-share-count-button.style-box.linkedin {
background: #1F76B7;
}
.ea-share-count-button.style-box.google {
background: #DC4B3E;
}
.ea-share-count-button.style-box.pinterest {
background: #CE2428;
}
.ea-share-count-button.style-box.instagram {
background: #47403A;
}
.ea-share-count-button.style-box.stumbleupon {
background: #F24E23;
}
.ea-share-count-button.style-box.included_total {
background: transparent;
color: #000;
line-height: 1;
width: 48px;
}
.ea-share-count-button.style-box.included_total .ea-share-count {
display: none;
font-size: 18px;
font-weight: 700;
width: 48px;
}
.ea-share-count-button.style-box.included_total .ea-share-count-label {
font-size: 12px;
text-transform: uppercase;
}
view raw style.css hosted with ❤ by GitHub

Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributing developer to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.

Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk