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

Så här lägger du till tillägget New Facebook Page i WordPress

Facebook gillar box även känd som Facebook fan box har blivit ett måste för många webbplatser. Nyligen ersatte Facebook detta widget med det nya Facebook Page plugin. I den här artikeln kommer vi att visa dig hur du add to Facebook page plugin i WordPress.

Note: Användare som redan har implementerat den gamla like boxen eller fan boxen på sina WordPress webbplatser kommer automatiskt att flyttas till det nya Page plugin.

Vad är tillägget Facebook Page?

Preview of a Facebook Page  plugin embed

Facebook page plugin är ersättningen för det som tidigare var känt som Facebook Like box. Det allow you att främja din Facebook page på din website. The new Facebook Page plugin gör exakt samma sak.

Det har ett nytt och förbättrat utseende som nu också visar ditt Facebook cover photo. Det kommer med två knappar. Användare kan gilla din page, och de kan också dela den. Du har alternativet att visa användare vilka av deras vänner som redan har gillat din page. Du kan också visa senaste inlägg från din Facebook-sida.

Tutorial för video

Subscribe to WPBeginner

Om du inte gillar videoklippet eller behöver fler instruktioner, fortsätt då att läsa.

Så här add to The New Facebook Page Plugin i WordPress

Först måste du besöka Facebooks Page Plugin website. Du hittar alternativen för att konfigurera utseendet på din Facebook-sida embed.

Facebook page plugin settings

Ange helt enkelt URL:en till din Facebook page. Därefter måste du enter bredden och höjden för boxen. Alternativt kan du lämna den tom, så försöker Facebook automatiskt justera den.

You can show your cover photo, posts, and friend’s faces in the page plugin. När du är nöjd med utseendet klickar du på knappen Get Code för att fortsätta.

Facebook page plugin code

Facebook kommer nu att visa dig två code snippets. Kopiera det första code snippet och klistra in det i ditt temas eller barntemas header.php-fil direkt efter taggen <body>.

Därefter kopierar du det andra code snippet och klistrar in det var som helst där du vill visa sidan som gillar boxen. Du kan också klistra in det här code snippet i en textwidget genom att gå till Appearance ” Widgets.

Vi hoppas att den här artikeln hjälpte dig att add to Facebook Page plugin till din WordPress site. Du kanske också vill kontrollera vår artikel om 5 snabba sätt att få fler Facebook gillar med hjälp av WordPress.

Om du gillade den här artikeln, vänligen prenumerera på vår YouTube-kanal för WordPress video tutorials. Du kan också hitta oss på Twitter och Facebook.

Avslöjande: Vårt innehåll stöds av våra läsare. Det innebär att om du klickar på några av våra länkar, kan vi tjäna en provision. Se hur WPBeginner finansieras, varför det är viktigt, och hur du kan stödja oss. Här är vår editoriala process.

Avatar

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.

Den ultimata WordPress-verktygslådan

Få GRATIS tillgång till vår verktygslåda - en samling WordPress-relaterade produkter och resurser som varje professionell användare bör ha!

Reader Interactions

43 kommentarerLämna ett svar

  1. Syed Balkhi

    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

    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

      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.

      Administratör

  3. Roja

    Is there any option of call us or Send message instead of share button

  4. Mario

    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?

  5. Xavier Clapin-Pépin

    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!
    Xavier

  6. John

    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!

    John

    • Xavier Clapin-Pépin

      I had the same issue, make sure your Facebook page is published in the settings.

  7. Teresa

    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

  8. Teresa

    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

  9. Diana Lesko

    Great video? How about the editing part? Where do you edit the width?

    • Diana Lesko

      I found my answer. :-) I cant delete my comment, sorry.

  10. John

    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.

  11. Anne Marie

    Hello,
    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

      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

        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 account..so 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! :)

  12. rohit

    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,

  13. Monique

    How can I display a foto, article( or link) from WP to a facebook page?

  14. niloy

    how can I change language in this Facebook plugin

  15. AL

    It works, thanks :D

  16. Bogdan

    It works only on widgets. How can I make it work on a page?

  17. Jackie Parry

    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.

  18. April

    Helpful post! Thank you.

  19. Tomas

    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!

  20. Carole

    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?

  21. Paul Butterworth

    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?

  22. Erik

    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!
    Thanks,
    Erik

    • Cameron Jones

      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
      Cameron

  23. Junaid

    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?

    • WPBeginner Support

      Please take a look at Social Plugins page on Facebook for more API parameters.

      Administratör

      • Junaid

        Already checked there, I couldn’t find a parameter to set number of posts to display.

  24. Long Nguyen

    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 diadiemdulich.com

  25. samkelo magoqo

    Thanks for the post! Would have loved to see the video tutorial also

  26. Jared

    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.

  27. Lindsey Garcia

    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!

  28. Sajid Akhtar Rehman

    Thank u very much….this is awsome post and works properly

  29. NemiraB

    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

  30. Abhishek

    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

  31. oladayo awe

    thanx for this post

  32. Govertz

    Is there anyone who has tested the performance impact with this new FB-plugin?

  33. Damien Carbery

    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.

Lämna ett svar

Tack för att du väljer att lämna en kommentar. Tänk på att alla kommentarer modereras enligt våra policy för kommentarer, och din e-postadress kommer INTE att publiceras. Vänligen använd INTE nyckelord i namnfältet. Låt oss ha en personlig och meningsfull konversation.