• This is what I need the code to remain like:

    <div id="frontsquares">
    <a class="leftsquare" href="https://luxurycaribbeanvillarental.com/springhouse/?page_id=134"><img class="squareimage alignleft" src="https://luxurycaribbeanvillarental.com/springhouse/wp-content/themes/thematic/library/images/frontsquares/suites.gif" alt="Suites at Spring House Bequia" width="90" height="90" /><h2>Suites</h2>
    Some text about the suites... +</a>
    </div>

    What that code generates, with CSS styles applied, when it’s not being mangled by WP is a box that displays a thumbnail image and text – and the background of the box changes when the user hovers. I’ve used it many times in non-WP sites beautifully and successfully.

    This is what WP is turning it into (even if I hard code in the HTML tab):

    <div id="frontsquares">
    <a class="leftsquare" href="../?page_id=134"><img class="squareimage alignleft" src="../library/images/frontsquares/suites.gif" alt="Suites at Spring House Bequia" width="90" height="90" /></a>
    
    <a class="leftsquare" href="../?page_id=134"></a>
    
    <a class="leftsquare" href="https://luxurycaribbeanvillarental.com/springhouse/?page_id=134"><h2>Suites</h2></a>
    
    <a class="leftsquare" href="https://luxurycaribbeanvillarental.com/springhouse/?page_id=134"></a>
    
    <a class="leftsquare" href="https://luxurycaribbeanvillarental.com/springhouse/?page_id=134"></a>
    
    <a class="leftsquare" href="https://luxurycaribbeanvillarental.com/springhouse/?page_id=134">Some text about the suites... +</a>

    What THAT mangled monstrosity generates is SIX boxes, all containing As you can probably imagine – this is REALLY annoying.

    Is there a way to get the editor – HTML or Visual – to stop closing and adding <a> tags?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Why? To stop the ignorant from screwing up their sites ??

    Can yuo turn it off?

    I believe that’s under Settings >> Writing

    WordPress should correct invalidly nested XHTML automatically

    Thread Starter secondtail

    (@secondtail)

    Ipstenu – I have that box unchecked, and it’s still happening.

    In the HTML editor after I click “update” it shows the code as I wrote it. But on the site, it shows extra code. Then – if I exit the editor and return – the mangled code is there. That’s probably what’s baffling me the most.

    I thought having the HTML area was supposed to give me more control but it’s just giving me a headache.

    Has anyone else had luck with a adding function hook or something in their theme? I tried using a hook that filtered wpautop but that’s not really been helping any as it’s for the auto <p> tag function.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Why is WP auto-closing tags?’ is closed to new replies.