• Hi,

    On this page (http://wonderfulwanderings.com/belgium/#belgium-unesco) I use ID’s to create jump links.
    The jump links work fine, the problem is that WordPress strips half of them whenever I update the page.

    For instance, if I want to jump from the index to the heading 3.1. UNESCO sites, my coding is this:

    <span id=”belgium-unesco”></span>
     
    <h3>3.1. UNESCO sites</h3>

    I do it like this and not with <h3 id=”belgium-unesco”> because I want the jump to end before the heading so that you can still see the heading and I only achieve that by putting the id in a separate span tag and then adding the   to leave some room.

    However, whenever I update the page, WordPress strips half of the <span id:”…”> and half of the &nbsp’s.

    And this isn’t the first time I’ve had WordPress trip coding when updating pages.
    I know it can happen when you change from html view to regular view (which shouldn’t, but it does), but in this case it even happens when I stay in the html editor.

    Anybody know how to prevent this?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Bet Hannon

    (@bethannon1)

    Have you tried using div’s with ID’s instead of spans?

    Thread Starter Wonderful Wanderings

    (@wonderful-wanderings)

    Not yet. I could try that.
    It’s strange because when they disappear, they don’t all disappear.
    For example, all those on the second half of the page might disappear.

    Moderator Bet Hannon

    (@bethannon1)

    WordPress does do some automatic stripping. I’ve not seen the issue you describe with spans, but I tend to use divs, and haven’t really had issues.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WordPress removes coding’ is closed to new replies.