Adding a Facebook Like Box in place of a featured page in the Customizr theme


Note :This snippet works only with the Classical style option. The Classical style option can be enabled in Appearance > Customize > Advanced > Theme Style. More about the theme style option here


Let’s say you need to feature your Facebook fans on your home page, and display it like one of your featured pages.

facebook-like-box-in-place-of-customizr-featured-page

 

I am assuming that you have generated your Facebook code for the lite box here : https://developers.facebook.com/docs/plugins/like-box-for-pages.

 

Now, here’s a quick snippet to replace one of your featured page by your Facebook like box.

To use this snippet you’ll need to set two parameters :

1) the id of your featured pages : choose “one”, “two” or “three”. In the following example, I have choosen the third one.

2) your Facebook page URL. For example https://www.facebook.com/my-page-name. In the following snippet you will need to replace YOUR-FACEBOOK-PAGE-URL by your Facebook page url.

Note: Featured Pages Unlimited happy users ? The filter is different for you : use ‘fpc_single_display’ instead of ‘tc_fp_single_display’

 

 

Where to copy/paste this code? => in your functions.php file. We strongly recommend you create a child theme. Download a start-up child theme here.

Remember: you shouldn’t edit the theme’s functions.php.

See How to customize the Customizr WordPress theme for more information on how to set up a functions.php file in a child theme.


Related Snippets you may also like


We can help you to implement this snippet

Coding is our job and we know WordPress inside and out. We can help you to customize your website with small chunks of code snippets like this one.

Send us your request and we'll get back to you quickly.



6 thoughts on “Adding a Facebook Like Box in place of a featured page in the Customizr theme

  • Helena

    Thanks Nicolas,

    Maybe a silly question… but at the functions.php I see no body tag to paste my twitter code.

    What do I need to do? or where?

  • Helena

    Really strange my previous message is gone…

    Ok again 🙂

    Thanks for all these snippets. As a beginner with WP it helps a lot!

    I am using a child theme from version 3.2.17.
    How can I get tweets in place of facebook box?

    Thanks a lot

    • Nicolas Post author

      Hi Helena,
      In the snippet, you can simply try to replace the Facebook code example by your Twitter one and this should do the trick !

      • Tiffany Scott

        Hi Nicolas and thank you for your awesome theme. I have tried everything I can think of to get it to work for twitter, but I have thus failed. I am just getting into learning functions.php, so I’m not sure what I am missing. Would you be able to put an example of one for twitter? Thank you!

  • Helena

    Hi,
    Is it possible to make 2 featured pages and the third one a twitter widget?

    Thanks for all help to this newbie in WP!!!

Comments are closed.