Jump to content
milesbrennan

Using ShareBar Space to Add External Link with Image

Recommended Posts

milesbrennan    0
milesbrennan

Hi All,

I have just put together a small site for a petition and used the "sharebar" section so people can link to it.

However I wanted to add an external link with image in the right hand section of the ShareBar, as their is plenty of space free.

I've searched but can not find an easy way to do this.... Or, is this the best way to do it at all... Happy to float / hover instead.

Primary site: http://www.ncop.org.au

This is the code I think I need to add. P.S.... I'm not really a dev.... ;-) But I've got as far as I could with firefox and firebug etc..

<div id="simplistech-logo">

<a href="http://www.simplistech.com.au" target="new">

<img src="http://www.ncop.org.au/wp-content/themes/ncop-pagelines-theme/images/simplistech-logo.png" alt="SIMPLISTECH : Technology Made Simple" />

</a>

</div>

Thanks in advance for either solutions.

Regards,

Miles

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi Miles,

You can add this to your child themes or PageLines customisation plugins functions.php file:



add_action('pagelines_inside_bottom_sharebar', 'sharebar_link');
function sharebar_link(){ ?>

<div id="simplistech-logo">
<a href="http://www.simplistech.com.au" target="new">
<img src="http://www.ncop.org.au/wp-content/themes/ncop-pagelines-theme/images/simplistech-logo.png" alt="SIMPLISTECH : Technology Made Simple" />
</a>
</div>

<?php

}
[/CODE]

Then you will need to postion the image link correctly with some custom CSS.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
milesbrennan    0
milesbrennan

Hi Danny,

Absolutely what I needed.....

I added the following CSS and it all aligned the way I wanted it.



#simplistech-logo a {

    bottom: 45px;

    float: right;

    position: relative;

    right: 12px;

    width: 180px;

}


There's a little extra white space now, but I can find where that is and minimise it.

Kindest regards,

Miles

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi Miles,

Awesome and no problem, happy to help!


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

The topic was marked as resolved.


Please search our forums, before posting!

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


  • Similar Content

    • arno
      By arno+
      The counter next to the icon in the Sharebar extension adds more mess than value for us. 
      Is there an easy way/code to hide the counter? (so that the icons line up closer?)
    • bnapoli
      By bnapoli+
      Is there an easy CSS fix to change the social media icons in Sharebar so they are colored, not just on hover?
    • MissT
      By MissT+
      Regarding the 'global option' mentioned by Simon in this previous post (to turn off the facebook opengraph data if you are using another plugin that provides it) ...where is this option? I don't seem to be able to find it.
      Many thanks in advance.
       
    • art23130
      By art23130+
      We had a very nice shortcodes library and hooker in the previous version of the platform. But in the version 5 they are missing. 
      So are you going to improve it again in future or no they are not supported anymore? 
      and one more question, what do you suggest for sharing bar which we had in DMS2 ?
      Thanks for your effort 
    • Audun MB
      By Audun MB+
      Currently my sharebar looks like this:

      Why is there a number next to LinkedIn? Is it supposed to show number of shares? 
      When I try to share anything, facebook just closes again, and the rest allows me to share "undefined undefined". 
      This might be because my site is restricted, but it seems weird?
       
       
       
×