Learning where to insert code into a WordPress blog can be confusing. Most code is written in HTML, as are the “presentation”, “theme editor” pages. All the more reason to learn HTML.
The process I follow to make inserting code into my WordPress blogs easier, is to study the “theme editor” pages. If you have become somewhat familiar with HTML, you’ll see how each line or section of code translates into your actual theme’s look.
If you experiment with inserting code and then “View Site”, you’ll immediately know if you’ve inserted it correctly.
Yesterday I decided to add a block of Google Adsense to my individual posts. The theme I’m using has a “single post” page, however, it’s written completely different than my other blog’s (Observation Mountain) code. I took a few minutes to read and study the code, and was then able to figure out the exact place to insert the ad block. This time it worked perfectly. Unfortunately, in the past I’ve made many mistakes and inserted code incorrectly.
Improperly inserted code is an easy fix. Just go back to where you inserted the code, highlight the code and delete it. If you know where it should go, just cut and paste.
Or…..if you’ve done like I have several times, when I really messed up, just start all over. Reload your theme and start with a blank slate.
Hint: It helps of you save a copy of your “Theme Editor” pages, before inserting code.