In this final article in my series of social sharing, I’m going to explain how to add a LinkedIn button to your Textpattern CMS articles. For disclosure, I don’t use LinkedIn – and don’t intend to – but I’m happy to share the technique for adding support to your website if it’s something that you want to do, ‘cos I’m a swell kinda guy. Per the previous 4 articles for Facebook, Twitter, Tumblr and Google plus, there’s code editing to be done. Before you even entertain the idea of changing your site, make sure you have good backups. If you’re edgy and brave, you can choose to continue without backups at your own risk. This is a low-risk text edit, so the chances of something breaking are slight, but seriously – make backups.
OK, pep talk over with. Take a look at what your site is going to be like after a LinkedIn button is adorning your sidebar:
To get this natty button, you need to edit the archive page of your Hive theme. Log in to Textpattern and locate the archive page from the Presentation → Pages tab. Copy and paste it into your text editor and look for the <div role=”complementary”> tag to point out the start of the grey sidebar panel. The code for a LinkedIn button is:
<script type="IN/Share" data-url="<txp:permlink />" data-counter="right"></script>
You can dress this up a little if you wish. I chose to tack it onto an <h4> header to tell my visitors about how they can (should) share all my cool things (take the hint, readers) to their buddies. Here’s how I did it:
<p> <txp:feed_link class="feed-rss" label="RSS" /> / <txp:feed_link class="feed-atom" flavor="atom" label="Atom" /> </p> <div> <h4>Share</h4> <script type="IN/Share" data-url="<txp:permlink />" data-counter="right"></script> </div>
Thanks for reading my short series of social sharing solutions for super solid and stupendous sites. I’ve over-alliterated myself now, I must go lay down. See you again soon.