Go to Facebook developers site
For example, the Like Plugin
http://developers.facebook.com/docs/reference/plugins/like/
Generate the code. You’ll get the generated code back in 2 blocks. The first is the SDK that must be added once on your page… preferably after the opening <body> tag. Depending on your theme you can paste that directly into header.php. If you have a child theme you might do it with hooks and filters… I can’t say.
Then Facebook says to place the second part of your code wherever you’d like it to appear, so in your case directly in your page template. You might even be able get away with pasting both sections of code directly into your page template.
There are a lot of plugins in the plugin repository that deal with Facebook if you aren’t comfortable with code.
Related Posts:
- og:url is driving me crazy?
- Facebook – Error parsing input URL, no data was cached, or no data was scraped
- Consuming an external API in WordPress?
- Is there a way to parse shortcodes in PHP?
- Static Frontpage Pagination – Custom loop
- Get the php template file from other theme folder
- Get FaceBook Friend Count [closed]
- W3 Cache plugin and Facebook sharing [closed]
- How to loop over custom fields in a page template?
- Adding a “most liked post” box, based on facebook ranking?
- Use Timber/Twig to pull an image by image ID [closed]
- Should I store my Facebook access tokens?
- Unable to set right time in admin and frontend template
- Easiest way to show total number of subpages
- Template tags for Buddypress
- is_page_template not working as expected
- Blank space at beginning of tag?
- How to generate “og:image” meta for Facebook sharing when the image in the post is not featured?
- How to display user nickname (not display name) in PHP template?
- Custom Template 404 for specific custom post type
- How to properly insert a link to a template in WordPress?
- Custom field value not saving when it contains a URL?
- Hiding styles from Facebook
- RSVP form for Facebook events from a WordPress post?
- Render ninja form inside markup
- How can I get a single php file that is the equivalent of an existing WordPress page?
- Custom search results page not working with empty search
- How to preserve exact formatting when copy pasting from Facebook into WordPress (or elsewhere)?
- I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php
- Send Facebook server-side event using shortcode and Official Facebook Pixel plugin
- Posting to Facebook via WordPress – 500 Internal Error
- How to show single category archive
- Enable custom logo upload if logo is not in header
- Facebook preview Open Graph Object Debugger
- How can I edit the content in index.php? [duplicate]
- Integrating Facebook calender to WordPress
- Whenever I am sharing a post wordpress phrase is automatically added, can anyone help?
- Show a different code on front page to other pages
- Is there any tool to find lines of codes responsible to generate front-end HTML elements?
- PHP include is only working in certain places in my custom WP theme
- Adding wrapper elements in the_date() like in the_title()?
- How to get all author posts outside of author templates
- How do I set a featured image for the homepage? [closed]
- Can’t access site after plugin activation
- Use Facebook PHP SDK from WPBook
- Integrate open graph protocol without plugin?
- Facebook share image wrong on post not on debugger [closed]
- Function returns post URLs rather than retrieving Facebook Graph API data
- Liking a facebook page from wordpress website?
- Facebook Like – Display counter starting at Zero?
- Why does the Woocommerce grouped template prints the unpublished products?
- How to render a block from php template
- Override Admin menu icon
- How to suppress template-parts in undescores?
- Creating custom page template from existing PHP site
- How do I query a single data value from the wp_metadata table?
- Conditional string comparison failing for basename/slug
- Template code to split a post and print a custom field?
- How to add new CSS file to new PHP file
- Some problems calling a function into sprintf() inside functions.php template file [closed]
- Strip hashtag off permalink with php
- SFC Problem with the comment login
- Single article separated into multiple pages makes Facebook Like button detect as completely separated articles
- Unprotected page appears protected when posted to Facebook (S2Member)
- open graph image being overwritten by gravatar logo?
- Integrate admin plugin into template. Very interesant (live search + autocomplete with wp rest api, in vanilla js)
- Display articles with a different template in the home page | Solved |
- Multiple account integration with facebook
- How to transfer the Facebook instance articles from one WordPress to another WordPress with same domain name?
- Load info from customposttype into template page
- Converting Array to String Issue [closed]
- ACF – Custom image for Product Tags not displaying
- Polylang and template files
- Show Gutenberg facebook embed with a custom theme
- How to create dynamic templates?
- Change WooCommerce template for PDF – access to custom field
- What syntax is this? “{{post.price}}”
- How do I modify the Previous and Next Page posts on blog pages to include “previous” and “next” before the links?
- image share on facebook missing
- Facebook sharing content problem
- Featured Image and Facebook
- Facebook like update status for wordpress
- FaceBook fan-block in a text-widget
- Problems With Query and/or Template Part and/or PHP
- How can i call the facebook #hashtag images on my site
- Odd page behaviour after removing sidebar
- Create Mashable Follow-like Facebook, Twitter login/connect?
- Custom Archive Page
- Problem with Simple Facebook Connect
- How to refresh a template page on WordPress in 3 seconds – easiest method?
- Right Facebook Open Graph Protocol into WordPress theme?
- get facebook status
- PHP Button Custom link [closed]
- How Facebook.com knows about duplicate pages on my site?
- get avatar from facebook graph [closed]
- Force Jetpack to use og:url with http on an https website
- Twig+WordPress how to use array arguments inside a function?
- How to implement a custom sliding banner? [closed]
- How to make a Template page to show the information of different things Shop and Product page?
- How to edit templates created in the block editor in code / template files not updating