Jump to content
Sign in to follow this  
unconsultancy

LinkedIn Share

Recommended Posts

unconsultancy
Actually the IDEAL solution would be to add a LinkedIn share button in same style / size at top right along with the existing social buttons. See site http://www.unconsultancy.com/

Share this post


Link to post
Share on other sites
unconsultancy
So what I think I need is a way of putting the code: Into where one of my unused Social Icons would go such as "Your YouTube Profile URL" Possible?

Share this post


Link to post
Share on other sites
kastelic
Heres the doc and video on using hooks: http://www.pagelines.com/docs/base-child-theme If you go activate platform base and open up platformbase/functions.php you will see that the example hook is actually exacly what you are wanting to do.

Share this post


Link to post
Share on other sites
unconsultancy
OK thanks. So to ensure I get this right if I open up /wp-content/themes/platformbase/functions.php I see : // HOOKS EXAMPLE --------// // Below is an example of how you would add a social media icon to the icons in header (branding section) // We have placed a hook at the end of the icon set specifically add new icons without modifying code or having to worry about your edits // getting thrown out during the upgrade process. The way to use hooks goes a little like this: // add_action('hook_name','function name'); // ---> uncomment to load //add_action('pagelines_branding_icons_end', 'add_icons_to_branding'); // function name function add_icons_to_branding(){ // This hook adds a stumbleupon icon to the header of your theme. The class referenced in the link can be seen in the style.css // and is the image from the CSS is placed in the images folder ?> with Should that do it? Thanks

Share this post


Link to post
Share on other sites
Kate
Not sure what that code outputs, but if its a button, then yes ;)

Share this post


Link to post
Share on other sites
unconsultancy
I have implemented the above but unfortunately it hasn't worked. So the Hooks part of my /wp-content/themes/platformbase/functions.php file now looks like this: // HOOKS EXAMPLE --------// // Below is an example of how you would add a social media icon to the icons in header (branding section) // We have placed a hook at the end of the icon set specifically add new icons without modifying code or having to worry about your edits // getting thrown out during the upgrade process. The way to use hooks goes a little like this: // add_action('hook_name','function name'); // ---> uncomment to load //add_action('pagelines_branding_icons_end', 'add_icons_to_branding'); // function name function add_icons_to_branding(){ // This hook adds a stumbleupon icon to the header of your theme. The class referenced in the link can be seen in the style.css // and is the image from the CSS is placed in the images folder ?>

Share this post


Link to post
Share on other sites
catrina
Do you want that button moved up to where the icons are in the header and hide the default LinkedIn button there is already there?

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
unconsultancy
1. Yes want it top right with other icons 2. NO not hide default LinkedIn button - they perform different functions. The default LI button takes the reader to my LI profile page whereas the button generated by this script on click brings up a popup to allow the reader to easily share the page with his/her LI groups / contacts etc.

Share this post


Link to post
Share on other sites
Jenny
I'm not sure why there is a semicolon in your code above. It shouldn't be there. The semicolon is located after both the "http://www.stumbleupon.com/stumbler/pagelines/" and "http://platform.linkedin.com/in.js". Try fixing this first to see if it works. Perhaps you could try using a link other than javascript. I found this with a simple google search combined a couple posts together: [code]http://www.linkedin.com/shareArticle?mini=true&url=&title=&summary=&source=unconsultancy.com[/code] If taking the semicolon out, see if you can use that in functions.php.

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
unconsultancy
Thankyou. I'm trying the other solution you suggest but I am getting it wrong I think. So I have amm,ended the hooks part of the file to: But it isn't working - have I got the code a bit wrong? // HOOKS EXAMPLE --------// // Below is an example of how you would add a social media icon to the icons in header (branding section) // We have placed a hook at the end of the icon set specifically add new icons without modifying code or having to worry about your edits // getting thrown out during the upgrade process. The way to use hooks goes a little like this: // add_action('hook_name','function name'); // ---> uncomment to load //add_action('pagelines_branding_icons_end', 'add_icons_to_branding'); // function name function add_icons_to_branding(){ // This hook adds a stumbleupon icon to the header of your theme. The class referenced in the link can be seen in the style.css // and is the image from the CSS is placed in the images folder ?> http://www.linkedin.com/shareArticle?mini=true&url=&title=&summary=&source=unconsultancy.com

Share this post


Link to post
Share on other sites
Simon
You have to uncomment the action.. and please put code inside forum code tags, its really hard to read otherwise :) [code] // HOOKS EXAMPLE // // Below is an example of how you would add a social media icon to the icons in header (branding section) // We have placed a hook at the end of the icon set specifically add new icons without modifying code or having to worry about your edits // getting thrown out during the upgrade process. The way to use hooks goes a little like this: // add_action('hook_name','function name'); // ---> uncomment to load add_action('pagelines_branding_icons_end', 'add_icons_to_branding'); // function name function add_icons_to_branding(){ // This hook adds a stumbleupon icon to the header of your theme. The class referenced in the link can be seen in the style.css // and is the image from the CSS is placed in the images folder ?> http://www.linkedin.com/shareArticle?mini=true&url=&title=&summary=&source=unconsultancy.com

Share this post


Link to post
Share on other sites
unconsultancy
Thankyou all - good progress being made! Silly me not uncommenting! Anyway the uncommenting is now done see for instance the homepage: http://www.unconsultancy.com/ So the LinkedIn share button is displaying and working correctly - just need to sort out the positioning now - preferably to the left of the other buttons. Can any sage help with that. Thankyou. Tim

Share this post


Link to post
Share on other sites
catrina
Please add the following CSS to Custom Code > Custom CSS: [code]span.IN-widget {margin-right: 37px;}[/code]

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
unconsultancy
Fantastic - thankyou . That works a treat.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×