Support » Fixing WordPress » Adding DIV’s within posts

  • Hi everyone.

    I’m creating a new page within wordpress and using the CODE option I’m inserting a DIV but on saving wordpress is converting the DIVS to P tags.

    Is there a way round this? I’d like to have TOTAL control of my content, but finding that I have none with this replacing malarkey.

Viewing 7 replies - 1 through 7 (of 7 total)
  • I’ve pulled my hair out over this one as well in the past. I got around my issue by giving the <p> it creates a class and styling that but doing it that way is bad semantics.

    I’d love to know the solution to this.

    In the past the solution was the plugin “text control” but I think it’s now no longer updated and isn’t compatible past version 2.1.3 of WordPress. You might want to look for another plugin that does the same thing.

    Is it possible to use the span tag to get the functionality you want? It and div are practically the same in most cases.

    Thread Starter tjobbe

    (@tjobbe)

    Hi Harknell.

    SPAN tags will not be sufficient in this case, here is a smaple of the code that I am using:

    <div class="templateBox">
    	<h5>Business Design 2007</h5>
    	<img src="/downloads/templates/thumbs/business-design-07.jpg" alt="Business Design 2007" />
    	<p class="templateBoxLinkA"><a href="/downloads/templates/business_design_2007/">Preview</a>
    
    	<p class="templateBoxLinkB"><a href="/downloads/templates/business_design_2007.zip">Download</a>
    
    </div>
    <div class="templateBox">
    	<h5>Business 08</h5>
    	<img src="/downloads/templates/thumbs/business-design-08.jpg" alt="Business Design 2007" />
    	<p class="templateBoxLinkA"><a href="/downloads/templates/business08/">Preview</a>
    
    	<p class="templateBoxLinkB"><a href="/downloads/templates/business08.zip">Download</a>
    
    </div>
    Thread Starter tjobbe

    (@tjobbe)

    Can anyone help with this topic?

    Have you tried disabling the visual editor from your profile screen and trying to put the code in that way?

    Thread Starter tjobbe

    (@tjobbe)

    nope. didn’t know that was possible?

    Just did it, and low and behold it works! thanks!!

    Was just about to say… try TextPattern

    *runs and hides*

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Adding DIV’s within posts’ is closed to new replies.