Thursday, October 7, 2010

Adding to Wordpress Template

Adding to Wordpress Template

In Wordpress you need to make the same changes as above, but these need to go into the Wordpress templates. You can also add a small amount of wordpress php code to ensure that each blog entry has it's own comment field.

This is all done in the theme for the site, and as such will be propagated across all relevant posts / pages depending upon which you update. You may want to create your own theme and edit that rather than the original, but you can just edit the original.

From the administration dashboard go to "Appearance" and "Editor", then choose the appropriate theme.

You then need to select the appropriate template file.

header.php (Header)
The xmlns tag should be entered within this template file.

footer.php (Footer)
You should insert the JavaScript code for the bottom of the page in this file.

single.php (Single Post) and/or page.php (Page Template)
These template files are used for blog posts and wordpress pages respectively. Update either or both of these depending upon which pages you would like to add your Facebook plugin to.

To include the individual post ID (eg. for the comment unique code) then add:

For example in my single.php file I have inserted the following just before the wordpress comments section:

"> ?>

0 comments:

Post a Comment