◦ Comprehensive security
◦ 24/7 support
WordPress Guide → Build → Facebook Like
How to add a Facebook Like button in WordPress
Want more likes, shares, and social visibility for your WordPress site? Adding a Facebook Like button is one of the easiest ways to boost engagement—without needing users to leave your website. Whether you’re a blogger, a business owner, or running an Ecommerce store, a well-placed Like button can turn casual visitors into brand advocates.
Let’s walk through the best ways to add a Facebook Like button to your WordPress site—using code, plugins, or page builders.
Get fast, reliable hosting for WordPress
Power your site with the industry’s fastest, most optimized WordPress hosting
What is the Facebook Like button and why use it?
The Facebook Like button lets visitors interact with your content or brand directly from your site. A single click adds a Like to their Facebook profile and may appear in their friends’ feeds, giving your content organic visibility.
Adding one to your site helps:
- Encourage social proof and trust
- Increase visibility on Facebook without ad spend
- Drive traffic to your content from users’ networks
You can use a Like button for a specific URL (like a blog post or product) or for your Facebook Page.
Understanding the types of Facebook Like buttons
Before adding anything, it helps to know the different formats available:
- Standard Like button: Shows a basic thumbs-up button.
- Like + Share combo: Adds a Share button next to the Like for more reach.
- Layout styles: Button count (shows number of likes), box count (above the button), or just the button itself.
- Display locations: Inside post content, floating sidebars, widget areas, or templates like headers and footers.
Choose based on what looks best for your site and where your traffic comes from.
Method 1: Add the Facebook Like button manually using code
This method gives you full control over placement and customization. You’ll use Facebook’s official Like button generator and paste the code into your site.
Step 1: Get the Facebook Like button code
- Visit the Meta for Developers Like Button Configurator
- Enter the URL you want users to Like (your homepage, a blog post, etc.)
- Customize the layout, size, and whether to include the Share button
- Copy the generated HTML code
Step 2: Add the code to WordPress
You can place the code almost anywhere:
- Inside a post or page: Use the Custom HTML block in the WordPress editor
- In a widget area: Go to Appearance → Widgets, add a Custom HTML widget, and paste your code
- In a theme template: For permanent placement, edit a child theme’s template file (e.g. single.php, page.php, or footer.php) and paste in the code
Optional: Load the Facebook SDK
Some Like button styles require the Facebook JavaScript SDK. To include it:
- Add the SDK code from the Like button configurator
- Paste it into your site’s <head> section or before the </body> tag
- The easiest way to do this is with a plugin like Insert Headers and Footers
Avoid loading the SDK multiple times—some themes or plugins may already include it.
Method 2: Use a plugin to add the Like button easily
Not comfortable editing code? Plugins make it easy to add Like buttons without writing a line.
Best plugins to add Facebook Like buttons
Here are top-rated plugins that support Facebook Like functionality:
- AddToAny Share Buttons – Lightweight, supports Like and Share, and integrates with nearly every theme
- Social Media Share Buttons & Social Sharing Icons – Includes Facebook Like, Follow, Share, and more
- WP Social Ninja – Advanced social integrations with a free tier and premium upgrade
- Smash Balloon Social Post Feed – Focuses on Facebook feed display but supports Like/Follow buttons too
How to install and set up a Like button plugin
- Go to Plugins → Add New in your WordPress dashboard
- Search for your preferred plugin and click Install then Activate
- Use the plugin settings to customize button size, style, and placement
- Many plugins offer widget or shortcode support for manual placement
Most plugins don’t require the Facebook SDK, which helps keep things lightweight.
Method 3: Use a page builder with social button widgets
If you’re already using a page builder like Elementor, adding a Like button is fast and flexible.
Adding a Facebook Like button with Elementor
- Open the page in Elementor
- Drag the Social Buttons or Facebook Button widget into your layout
- Customize size, layout, and alignment
- Set the button URL to the page or post itself
Other page builder options
- Gutenberg: Use block plugins to get social button blocks
- WPBakery: Social elements often included in premium themes
- Beaver Builder: Use third-party social plugins or custom HTML modules
Where should you display the Facebook Like button?
Strategic placement is key. Here are common locations that perform well:
- Below blog posts: Catch readers who liked the content
- Top of articles: Good for audiences that trust your brand
- Sidebar widget: Stays visible as users scroll
- Floating bar: Keeps the button in view at all times
- Footer: Adds consistency across all pages
Use Google Analytics or heatmaps to test what works best for your audience.
Troubleshooting Facebook Like button issues
If the button doesn’t show up or work properly, here are quick fixes:
- Nothing displays: Make sure the Facebook SDK is loaded once, and the Like button code is complete
- Wrong URL: Use <?php the_permalink(); ?> in templates to dynamically load post URLs
- SDK conflicts: Disable other plugins one by one to test for double-loading
- Caching issues: Clear your browser and site cache after making changes
Bonus: How to track Facebook Likes with analytics
Want to measure how your Like button is performing?
- Meta Pixel: Add it to your site to track Facebook Likes and conversions
- Facebook Insights: Monitor Page Likes and post engagement
- Google Tag Manager: Track button clicks by triggering events on Like button elements
Tracking helps you understand where to place the button and what kind of content earns the most engagement.
Getting started with Facebook Like buttons in WordPress
Adding a Facebook Like button to WordPress is one of the simplest ways to grow your brand’s reach and build social proof. Whether you use a plugin, page builder, or paste the code yourself, the benefits are worth it.
If you’re new to the process, start with a plugin and test it on a few posts or pages. Then consider more advanced placements or analytics tracking to fine-tune your strategy.
Ready to take the training wheels off your WordPress site? Upgrade to professional hosting and see how better speeds, security, and reliability provide a foundation for a website and a brand that people find engaging and trustworthy. Liquid Web’s WordPress hosting options configure business-class servers and support plans specifically for WordPress websites.
Don’t want to deal with server management and maintenance? Our fully managed WordPress hosting is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.
You can avoid site speed problems when you’re with Nexcess Fully Managed WordPress or Liquid Web’s suite of WordPress hosting solutions.
Additional resources
How to build a WordPress site →
A complete beginner’s guide that covers 9 key steps to a successful launch
Website builders vs. WordPress →
With website builders and WordPress at your disposal, you don’t need to expend your energy or savings to build a website that suits your brand.
How to use WordPress Gutenberg blocks →
A complete beginner’s guide to Gutenberg blocks