Jump to content
Sign in to follow this  
timversnel

Facebook Like-button on Homepage

Recommended Posts

timversnel

Hi Pagelines friends and fellow Platform Pro users, I would like to add a Facebook Like-button to my homepage (in addition to the like-buttons on the single posts pages) and was just wondering if any of you has found a good way to do this. I realize it's not perse Pagelines-related, but I figured we're a community here and It'd be great to share some experiences. Thanks!

Share this post


Link to post
Share on other sites
catrina

There are plugins for adding a Facebook "Like" buttons that allows visitors to like an overall page. Here's one plugin you can install and activate for adding the button to blog posts: http://wordpress.org/extend/plugins/wordpress-facebook-like-plugin/ Here's another one for adding a Facebook "Like" button and box for liking the overall website: http://wordpress.org/extend/plugins/facebook-like-box-widget/


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
timversnel

Thanks for those suggestions and those plugins are certainly a good way to add a Like button. There is a 'but' though... Those plugins require placement as a widget in a sidebar and I don't use sidebars on my website (except in the footer). Ideally I would like te place the button somewhere on the left in the header section. In a perfect world I'd put it in the navbar, aligned all the way to the left, just above or below it being the second and third best options. Just now I've added the universal sidebar to the header section above the branding and put the button widget in there. However, it's aligned to the right (can't figure out how to have it align left) and it requires a title (if I leave the title field open it falls back to default). Although this works, it's less than ideal. Any creative ideas? Thanks!

Share this post


Link to post
Share on other sites
kastelic

1. Activate the Base Child Theme. 2. Add a function (steps and a video in the link below) that contains the like button code from Facebook. 3. "Point" that function to a hook within the theme. Go to Template Setup -> Site Header and click on "advanced setup" under "Navigation." There you will see a list of associated hooks. All this is done within functions.php in the base child theme folder. The hooks already reside throughout the theme, you just need to decide which one to target with your funtion. How To: http://www.pagelines.com/docs/base-child-theme You could try using any of the hooks near the nav bar like: pagelines_before_primary-nav

Share this post


Link to post
Share on other sites
timversnel

That worked! I can't believe I actually managed to get this right on first attempt, which is a LOT of credit to you guys. Thanks so much!

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  

×