• I am using the AgentPress 2 theme by StudioPress and WordPress version 3.2.1. I created a new page within my site where I want users to find my contact information and fill out a contact form to request information. The contact form works correctly on my existing web page but not in my WordPress web site.

    When adding a new page to my WP web site, I am using the WP HTML editor. I wrote the HTML code for the contact information and contact form. WordPress adds invisible closing </p> tags which causes the page not to validate and throws off the alignment of the label and textbox. Adding in the opening <p> tag the page will validate however the alignment of the label and textbox is still off.

    You can see the </p> tags applied by WP when validating the page in Firefox using firebug.

    Without the P element the label is on the same line as the input box which is what I want (saves space vertically).

    Example:
    <label class=”mylabelcontcol” for=”firstname”>First Name:</label></p> (invisible P tag)
    <input type=”text” name=”firstname” id=”firstname” tabindex=”1″/>

    How can I prevent WP from randomly applying these tags as it doesn’t add to all rows of like code?

    Do professional WP developers have a different editor or means of creating pages with the expected results for WordPress? I have seen many examples of web sites built using the AgentPress 2 theme so there must be a way to correctly code the pages and avoid this issue.

    The class=”mylabelcontcol” above is my css code for adding a little space vertically between the input boxes and labels.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try saving the page from HTML tab. Don’t switch to Visual tab. I read some where that this should word.

    The other way is to create a page template and assign that to the blank page within WP.

    https://codex.www.ads-software.com/Pages#Creating_Your_Own_Page_Templates

    Thread Starter BigFish2

    (@bigfish2)

    Thank you for the reply.
    I don’t use the visual tab or toggle between visual and HTML as I did read the same. With this said I work and save while in the HTML tab. It’s strange that they are invisible and you cannot delete them while working in the HTML tab.

    If I add <!– –> to add comments, WP will add a </p> tag to the end and sometimes the opening tag. This increases the vertical space between the form elements.

    Hopefully there is an answer to this before learning how to use templates.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress "add new page" HTML editor’ is closed to new replies.