adsense

How to Use WordPress Template Tags in a Post





1. Log in to your WordPress admin control panel. Click 'Plugins' from the left-hand menu bar, and then click 'Add New.' Type 'PHP Execution' into the text field in the middle of the screen, and then press 'Enter.'
2. Find 'PHP Execution' in the list of results that appears, and then click the 'Install Now' link. After WordPress has finished installing the plugin, click the 'Activate Plugin' link that appears. Once PHP Execution has been activated, the visual editor will immediately accept PHP code.

3. Click 'Posts' from the main menu bar on the left, then click 'Add New.' As an alternative, if you want to add a template tag to an existing post, find the post in the list and click its title. Click the 'HTML' tab, then put your cursor at the point you want to add the template tag, and paste in the following code:
Replace 'put_tag_here()' with the template tag you want to use. See the WordPress Codex for a full list of available tags. Note that the opening
tag are essential -- if you do not include them, your post will simply display the tag as normal text.
4. Click 'Publish,' or 'Update Post' if you are editing an existing post to save your changes. Go to the post on your blog and check to see if the tag is performing correctly. If it is not, try these two steps. First, go back to the editing screen for the post, and check that you added the code correctly. Make sure the semi-colon is present at the end of the tag,and that any tag parameters in the brackets are in the correct format, and flanked by apostrophes. Secondly, try clearing your browser cache, and then click 'Update Post.'

Comments

0 Responses to "How to Use WordPress Template Tags in a Post"

Post a Comment

Popular Posts

About