annealex59
Member
Posted 1 year ago #
I am trying to put a security seal on a PAGE on my 2010 theme blog 3.0.4. The code is javascript combined .html I am trying to add to a page but WP is messing up the code. It shows the image but a bunch of gobbledeegook above it. Here is the beginning and end of the code to give you an idea:
<a name="trustlink" href="http:// target="_blank"
onclick="var nonwin=navigator.appName!='Microsoft Internet Explorer'?'yes':'no'; window.open(this.href.replace('http',
[code deleted]
'+d.getFullYear()+'.'); return false;">
<img name=XXX>
I put it in the footer template and that worked, but not on a page.
Can anyone help?
Many thanks!!!
Anne
You cannot add JavaScript to page content. It has to be added to a template file. Try adding the code to a Text widget in your sidebar.
You should also be aware that any changes you have already made to any template or theme files in Twenty Ten will be over-written the next time you upgrade WordPress or the theme. For this reason, it is recommended that you consider creating a child theme for your customisations.
annealex59
Member
Posted 1 year ago #
Thanks, Esmi! I had heard about the child theme, but I wasn't sure if changes I made were affected by upgrades to WP as well as the specific theme.
Twenty Ten is the current default theme, so it is considered to be part of core and will be included in any WP update.