Archived

This topic is now archived and is closed to further replies.

  • 0

Adding A Facebook Like Link After Page Title/logo Using Hooks


Question

Posted · Report post

I am wondering if there is any way for me to get a facebook like button to show up AFTER the site title/logo in the header?  I am close -- was able to add one above the title/logo, but cannot get it to align to the right of it.  I accomplished this by adding a hook into the functions.php: 

 

add_action('pagelines_site_logo', 'fblike');
function fblike(){
?>
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
</div>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-50a1c3640c621b4b"></script>
<?php }

 

You can see the site here: http://updated-kid2kid.com/test/ (it is a subsite)

 

I tried to change the hook function to 'pagelines_after_site_logo' and 'after_pagelines_site_logo' without any luck.  Any idea what I can do to accomplish this the way I would like?

 

Share this post


Link to post
Share on other sites

4 answers to this question

Posted · Report post

I got it figured out. Turns out the div was forcing it to show up before the title.  I just put it in a span, added a class style to the span and it is working now.  

Share this post


Link to post
Share on other sites

Posted · Report post

This is what I want it to look like:

whatIwant.png

 

This is what it currently looks like: 

whatItis.png

Share this post


Link to post
Share on other sites

Posted · Report post

You know there's always the option of adding a div wrapped shortcode from http://demo.pagelines.me/tools/

 

Wrapping it in a div or class would allow you to position it where you'd like.

Share this post


Link to post
Share on other sites

Posted · Report post

Hey Robb - I would (I love the pagelines shortcodes) but the client needs it to work with analytics from her addthis.com account.  

Share this post


Link to post
Share on other sites