Social Links hooks for WordPress

Social links hooks plugin panel

I’ve created a very simple plugin to display handy little icons where you want in your wordpress theme.

example 1

example 2

Download on github at https://github.com/ekynoxe/Social-link-hooks-for-Wordpress

Options are really simple, you pass them as an array as in the example below:

  • show_labels: displays the name of the social network next to the icon. default: true
  • before: the tag to display before the link. default: <dd>
  • after: the tag to display after the link. default: </dd>

Put this code in your functions.php

function print_social_links(){
  if ( class_exists( 'SocialLinksHooks' ) ):
    $sl_hooks = new SocialLinksHooks();
    $sl_hooks->printLinks(array('show_labels'=>false,'before'=>'', after=>''));
  endif;
}

Then, in your template, wherever you want, call the above function:

print_social_links();

Extending it should be a breeze for any PHP developer. That’s it!

Comments are disabled temporarily until I find a suitable system, but you can still send a comment by email and I'll add it to this post. Thanks!