Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Coupe WPB
25 Million+
Websites using our plugins
Years of WordPress experience
WordPress tutorials
by experts

Comment ajouter l’extension de la nouvelle page Facebook dans WordPress

Note éditoriale : Nous percevons une commission sur les liens des partenaires sur WPBeginner. Les commissions n'affectent pas les opinions ou les évaluations de nos rédacteurs. En savoir plus sur Processus éditorial.

La boîte « like » de Facebook, également connue sous le nom de boîte « fan » de Facebook, est devenue un élément indispensable pour de nombreux sites. Récemment, Facebook a remplacé ce widget par la nouvelle extension de page Facebook. Dans cet article, nous allons vous afficher comment ajouter l’extension de page Facebook dans WordPress.

Note : Les utilisateurs/utilisatrices qui ont déjà implémenté l’ancienne boîte de like ou boîte de fan sur leurs sites WordPress seront automatiquement déplacés vers la nouvelle extension Page.

Qu’est-ce que l’extension de page Facebook ?

Preview of a Facebook Page  plugin embed

L’extension de page Facebook est le remplacement de ce que l’on appelait auparavant la boîte « J’aime » de Facebook. Il vous permettait de promouvoir votre page Facebook sur votre site. La nouvelle extension de page Facebook fait exactement la même chose.

Il a un look nouveau et amélioré qui affiche désormais également votre photo de couverture Facebook. Il comporte deux boutons. Les utilisateurs/utilisatrices peuvent aimer votre page et la partager. Vous avez l’option d’afficher aux utilisateurs/utilisatrices quels sont leurs amis qui ont déjà aimé votre page. Vous pouvez également afficher les publications récentes de votre page Facebook.

Tutoriel vidéo

Subscribe to WPBeginner

Si vous n’aimez pas la vidéo ou si vous avez besoin de plus d’instructions, alors continuez à lire.

Comment ajouter la nouvelle extension de page Facebook dans WordPress

Tout d’abord, vous devez visiter le site de l’extension de page Facebook. Vous y trouverez les options permettant de configurer l’Apparence de votre page Facebook embarquée.

Facebook page plugin settings

Il vous suffit d’indiquer l’URL de votre page Facebook. Ensuite, vous devrez saisir la largeur et la hauteur de la boîte. Vous pouvez également ne rien indiquer et Facebook essaiera de les ajuster automatiquement.

Vous pouvez afficher votre photo de couverture, vos publications et les visages de vos amis dans l’extension de la page. Une fois que vous êtes satisfait de l’apparence, cliquez sur le bouton Obtenir le code pour continuer.

Facebook page plugin code

Facebook vous affiche alors deux extraits de code. Copiez le premier extrait de code et collez-le dans le fichier header.php de votre thème ou thème enfant, juste après l’identifié <body>.

Ensuite, copiez le second extrait de code et collez-le à l’endroit où vous souhaitez afficher la boîte « page like ». Vous pouvez également coller cet extrait de code dans un widget de texte en allant dans Apparence  » Widgets.

Nous espérons que cet article vous a aidé à ajouter l’extension Facebook Page à votre site WordPress. Vous pouvez également consulter notre article sur les 5 façons rapides d’obtenir plus de likes sur Facebook en utilisant WordPress.

Si vous avez aimé cet article, Veuillez vous abonner à notre chaîne YouTube pour des tutoriels vidéo WordPress. Vous pouvez également nous trouver sur Twitter et Facebook.

Divulgation : Notre contenu est soutenu par les lecteurs. Cela signifie que si vous cliquez sur certains de nos liens, nous pouvons gagner une commission. Consultez comment WPBeginner est financé, pourquoi cela compte et comment vous pouvez nous soutenir. Voici notre processus éditorial.


Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

L'ultime WordPress Toolkit

Accédez GRATUITEMENT à notre boîte à outils - une collection de produits et de ressources liés à WordPress que tous les professionnels devraient avoir !

Reader Interactions

43 commentairesLaisser une réponse

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Paddy says

    This is not supporting to Mozilla browser. Supporting only on Chrome.
    Could you please help me to setup it for all the browser?

    • WPBeginner Support says

      The page plugin should still work on FireFox, you may want to try disabling your browser addons to ensure it is not a conflict there.


  3. Mario says

    Hello, when I try to use it and add through widget either text or html widget it wont go through as it strips all the data-attribute elements. Can you help me/us?

  4. Xavier Clapin-Pépin says

    Thank you wpbeginner it’s great because I don’t have to download a WP plugin to add the Facebook Plugin Page which is recommended to minimize the number of plugins to avoid conflicts and having too many potential issues…

    It looks great the Facebook Plugin Page on our website as you can see on the right sidebar:
    Keep on your amazing work!

  5. John says

    I’m still having issues…

    For whatever reason when I’m filling it out under

    My page preview doesn’t appear…

    So I think it’s some type of permission settings that I have messed up.

    So when I get the code and put it on my page, it doesn’t appear either. Please help!


  6. Teresa says

    Ok I got that figured out, but I don’t want to show a post – makes it too big. Your example shows where you can uncheck that, but on the page that option is not there. How do I get rid of that and just show my FB page header? Thanks

  7. Teresa says

    So i did exactly as you said – I now have a FB box with mark zukerbergs live video just like is on the page where I copied the code…why would i get that? Obviously not what I want – so not helpful

  8. John says

    Okay, I’m stumped. I followed the directions here on a friend’s WordPress site for her travel agency, and it worked perfectly. For four days. Then it just stopped working. To test it out, I changed the URL to another friend’s facebook page and it worked. But once I changed back to the travel agency page, nada. I was hoping you might have an idea on what’s going on and/or, even better, how I can get the app to work again.

  9. Anne Marie says

    I have been really struggling to complete this process : the Facebook developers page refuses my Facebook page URL, as well as my profile page URL…I just don’t know what to do to have it appear on my blog.
    Also, if I try, with Beaver Builder tools to add a « shortcode » from any plugin for Facebook, it never works! Nothing shows. Can you help please? Thanks!!!

    • chris says

      have you found an answer to this? is it a fb setting? I am having the same issue. trying to do this to a group. not sure if i need to be a page admin for the code to work properly or what.

      • Anne-Marie says

        Hi Chris, yes! I wrote to the plugin company and they helped me understand the major difference between « everyone’s » Facebook page (aka, your personal page)–AND–the Facebook page you create with a different until you do the steps via Facebook to create yourself a second, « professional » page (free, quite easy to do), no plugin will work. Once you do this, go back in the plugin section asking for your professional page Facebook URL (which is different), and it should show easily on your blog or site…hope it works for you too! :)

  10. rohit says

    Hello. I am able to get the link on my website but not able to get the pic of page or any visual. How to fix that? Please help,

  11. Jackie Parry says

    Thanks for the info – but for dummies like me, where do I find the page to put my FB page URL, as per your first pic. I opened the link to go to FB plugin website – but I don’t how how to get the right page up to add my url – please advise. Thanks.

  12. Tomas says

    Thanks for this post it was just what I was looking for!

    However when using the Share button everyone keeps getting the following error:

    App Not Setup: This app is still in development mode, and you don’t have access to it. Switch to a registered test user or ask an app admin for permissions.

    Any advise? Thanks!

  13. Carole says

    I’ve inserted the code but for some reason only the top 1/4″ of the image shows up. It looks fine in Preview on the FB page to create the code, but not on my website. Any idea on how to fix this?

  14. Paul Butterworth says

    Thanks for this, it works, but I cant get the Adapt to plugin container width to work, its narrow, and if I set it manually the 500 width maximum is rather narrow. Is there a way to make it wider?

  15. Erik says

    Question: Is this Facebook Page Plugin the same as the Facebook Page Plugin created by Cameron Jones that can be found here:

    Not sure if it matters, but I’m trying to discern which one to use. If you have any helpful suggestions or info, I’d appreciate it!

    • Cameron Jones says

      Hi Erik,

      My plugin and the tutorial here are the same, but also different. Following this tutorial you need to edit your theme’s templates to add the code for the Facebook plugin, however if you use my WP plugin it will write all the code for you and you can control the options with either a shortcode or a widget.

      I hope that helps you

  16. Junaid says

    I have used this method to add facebook feed here at. But it displays only 5 recent posts, after 5 posts it displays a button « Find us on Facebook » is there a way I can set it to display unlimited posts or atleast increase the number of posts to display?

  17. Long Nguyen says

    I have found that even I don’t copy the first snippet to the header.php, the code in the second snippet still helps to show the badge.

    But I face a problem that the badge does not show all. It shows half of the left, so I have lost the share button on the right, no matter how I adjust the width at the code.

    Could you please advise how I can make it a full badge? Thanks. Mine web is

  18. Jared says

    I noticed on some themes that I am running you have to add the initialization for Facebook’s Javascript SDK to your file. As well as the code Facebook gives for your plugin.

    I also experimented by minifying the javascript and it still works. However, the performance of the new plugin is lacking. I noticed it loads last compared to the I was previously using.

  19. Lindsey Garcia says

    Okay, great, this rocks! BUT how do I paste the code in my child theme .php file????? I have no idea what you are talking about (newbie blogger). Is it within my wordpress dashboard? Is it through my host and I have to head over there? I found a youtube tutorial for this, too, and they did the same thing by not explaining how to do that…?? Help would be great! Thank you!

  20. NemiraB says

    Hi, thanks for information. It is a little bit complicated for me, but I guess it is worth to try it. These social connections are so important, because how you can spread your message without them? All the best, regards. Nemira

  21. Abhishek says

    Thanks very much for the update finally updated my site with Facebook page plugin. I didn’t used the above 1st code , rather I used 2nd code and made a widget when I need to appear

  22. Damien Carbery says

    A function plugin (with add_action for wp_head) would be a great place for the Javascript code. This would mean that the header.php file would not have to be modified – useful for when the site owner has changed a parent theme or does not want to touch the child theme code.

Laisser une réponse

Merci d'avoir choisi de laisser un commentaire. Veuillez garder à l'esprit que tous les commentaires sont modérés selon notre politique de commentaires, et votre adresse e-mail ne sera PAS publiée. Veuillez NE PAS utiliser de mots-clés dans le champ du nom. Ayons une conversation personnelle et significative.