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

5 posts in this topic

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>
<script type="text/javascript" src="//"></script>
<?php }


You can see the site here: (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

This is what I want it to look like:



This is what it currently looks like: 


Share this post

Link to post
Share on other sites

You know there's always the option of adding a div wrapped shortcode from


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

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

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

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

    • Why would this custom function NOT work?
      By Justin Taylor+
      I am using a child theme (the pl-starter-theme-master) and have added the following custom function to the child functions.php file:
      // Add AddThis share code to blog posts add_action('pagelines_loop_before_post_content', 'add_addthis_share_code'); function add_addthis_share_code() { echo"<div class=\"addthis_sharing_toolbox\"></div> "; }It isn't do anything. Can someone see why?
    • Where to add a hook for Master Slider
      By vanessabt+
      I am starting to build a new site.  I would really like to use the MasterSlider plugin for my homepage slider.  I loaded it in and when I use it if I paste the generated shortcode into the page as instructed it ends up showing at the bottom of a content loop section instead of  at the top of the page.
      I realize that a hook probably needs to be added to tell pagelines to run masterslider,  but for the life of me I have no clue what needs to be put in or where it would go.
      I am building a demo site first before the site is moved so that I can troubleshoot issues like this.  I downloaded the base child theme since I figured we would need add the customization there to be safe from updates and for some reason the hooker section does not show up even though the plugin is installed so I cant use that either.
      I am also confused. do I use an action hook from pagelines or one from the masterslider site,
      I tried to put both of these into the functions.php document
      <?php get_masterslider(1); ?> 
      <?php echo get_masterslider(1); ?>
      but all that seem to do was break the site.
      Does it need to be something like:
      add_action('pagelines_page', 'masterslider_homepage');
         function masterslider_homepage(1) {
         <?php masterslider(1); ?>
      I am sure that is probably nothing but a hot looking mess, but I am at a complete loss of ideas with this.  And where does code like this go into the functions php document? I thought it would go at the very top but I sure I am wrong.
      Please let me know if you can provide any guidance.
      Thank you
    • How to use Action map
      By rijans
      I have enabled Action Map in Pagelines Pro settings. But I don't see any map in my editor. Someone told it's plugin. But what's the link to the plugin.
    • PL Hooker
      By MobileParity+
      I will be creating a child theme of PinsPro to act as the default theme for all new sites on a WPMU install. What I am wondering is this: Can I use PL Hooker to customize WooCommerce templates in the new child theme? Or does PL Hooker only work with the predefined PL and WP hooks?
    • Functions.php for PageLines Store Child Themes
      By dawsonbarber+
      I originally asked this question over here but realized I should have started a new topic.   I don't seem to be able to start one under the PageLines Store Products forum because I can't find Enrique Chavez listed there.   Anyway, my question is about the Pagelines store child themes, like Flatten and Voyant.   Where do I add custom functions? There does not appear to be a functions.php file that I can/should edit so I'm wondering where they go.   I usually use a child theme based on Danny's Skeleton child theme, which, of course, has a file for custom functions.   Please advise.   Thanks