Descripció
Show twitter and facebook share count. Send your feature request.
Instal·lació
- Upload
post-share-count.zipand extract to the/wp-content/plugins/directory - Activate the plugin through the ‘Plugins’ menu in WordPress
- Place
<?php the_post_share_count(); ?>in your templates
PMF
- How to add html wrapper or some css class to counter and/or display counter as link?
-
Use array as argument with keys
before_andafter_prefix and social link name, here is example how to add @via parameter twitter sharing link:<?php $share_args = array( 'before_twitter' => '<span class="share-link"><a href="https://twitter.com/intent/tweet?text=' . urlencode(get_the_title()) . '&url=' . urlencode(get_permalink()) . '&via=' . urlencode('your-twitter-name') . '" rel="nofollow" target="_blank"><span class="genericon genericon-twitter"></span> ', 'after_twitter' => '</a></span>', ); the_post_share_count( $share_args ); ?>Also you can add changes to
functions.php:
function your_theme_post_share_count_services( $services ) {
$services[‘twitter’][‘before’] = ‘ ‘;
return $services;
}
add_filter(‘post_share_count_services’, ‘your_theme_post_share_count_services’); - How to limit list of social networks? (or “I want only twitter counter”)
-
Add
show_onlyparameter:
array( ‘twitter’, ‘facebook’ ));
the_post_share_count($args);
?>Also you can do it in
functions.php:
function your_theme_post_share_count_services( $services ) {
unset( $services[‘facebook’] );
unset( $services[‘pinterest’] );
unset( $services[‘googleplus’] );
unset( $services[‘linkedin’] );
return $services;
}
add_filter(‘post_share_count_services’, ‘your_theme_post_share_count_services’);
Ressenyes
No hi ha ressenyes per a aquesta extensió.
Col·laboradors i desenvolupadors
«Post Share Count» és programari de codi obert. La següent gent ha col·laborat en aquesta extensió.
Col·laboradorsTraduïu «Post Share Count» a la vostra llengua.
Interessats en el desenvolupament?
Navegueu pel codi, baixeu-vos el repositori SVN, o subscriviu-vos al registre de desenvolupament per fisl de subscripció RSS.
Registre de canvis
0.5
- Fix pinterest counter
0.4
- Added LinkedIn counter
- Added genericon css classes for icon font support
- Added parameters
timeandmax_sync, seeget_the_post_share_count()function for details - Change donate link to PayPal
0.2
- Added facebook counter
- Changed
the_post_share_countarguments, now one arg as array, see faq.
