jonjensen
Member
Posted 2 years ago #
I have a box with buttons at the footer of all my posts to share (http://jonjensen.com/blog/?p=1487 for example). All the buttons work, but I can't figure how to automatically generate the URL, blog title, and a first paragraph in the PHP.
LinkedIn says this is possible: http://www.linkedin.com/static?key=developers_widget_shareonlinkedin
Anyone know what code I can put in to auto-generate the meta data?
Seriously stumped.
codybuell
Member
Posted 2 years ago #
Yep, here is one possibility for your link:
<a href="http://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink() ?>&title=<?php the_title(); ?>&summary=&source=<?php bloginfo('name'); ?>" target="_new">
Frank.Prendergast
Member
Posted 1 year ago #
Just in case anyone is looking for more info on how to create a custom LinkedIn button in a WordPress template I put together notes on my approach here: http://frankprendergast.ie/blog/1027/linkedin-share-button-wordpres/
I hope to have a plugin to handle it soon, but in the meantime, I hope this helps.
Frank.Prendergast
Member
Posted 1 year ago #