WordPress.org

Ready to get started?Download WordPress

Forums

HTML disappearing when trying to update page. (4 posts)

  1. angie33
    Member
    Posted 5 years ago #

    I am trying to put in HTML codes for some recommended books on my "Recommended Resources" page. They are HTML codes from my amazon affiliate stuff. The codes go in fine, I can preview it, move them, etc, then, when I update page or publish it, the banners are gone....
    Please help!

  2. stvwlf
    Member
    Posted 5 years ago #

    Hi

    The WordPress editor sometimes "eats" portions of HTML forms, especially hidden fields, and also sometime javascript code.

    One way to do it is to create a custom page template
    http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates
    and assign it to the Resources page - then add the code in the PHP template file as HTML.

    Another way is to enter the code in a custom field on the page, and use the custom-fields-shortcode plugin to embed the custom field into the post.

  3. mkirkwag
    Member
    Posted 5 years ago #

    angie33 - did you try this? Did you find another solution? This is the most frustrating thing! It was working fine and not this...

  4. mkirkwag
    Member
    Posted 5 years ago #

    Well, embarrassing as it is, I think I should share this. When I pasted in my code and previewed, my code would disappear. When I went back to look at the post, or published the post, the code would disappear from HTML. Then I noticed an email from my spouse with the new ad blocker we bought the other day...that I downloaded...that I installed. Yep. Blocking my own ads.

    If you're having this problem, make sure you don't have an ad blocker turned on!

Topic Closed

This topic has been closed to new replies.

About this Topic