WordPress.org

Ready to get started?Download WordPress

Forums

AnyVar
Using Anyvar for HTML-Code (2 posts)

  1. Mackser
    Member
    Posted 2 years ago #

    Hi there,

    I'm using Anyvar to simply insert HTML-code into my posts – without having to deal with the auto-p and html-stripping functions of the wordpress editor.

    Now, the code i want to embed is something like "<div><form>blabla</form></div>", the variable I determined is "optinform".

    So I'm writing something like this:

    Hi, this is my text!
    
    <h3>Sign up now!</h3>
    
    [optinform]

    The code I get out, is:

    <p>Hi, this is my text!</p>
    
    <h3>Sign up now!</h3>
    
    <p><div><form>blabla</form></div></p>

    How can I make wordpress to not put p-tags around my div-containers?

    Thank you for your help.

    Cheers

    Mackser

  2. calfzhou
    Member
    Posted 2 years ago #

    meeting the similar issue. Most times the auto-p is great, but in some special cases it become terrible.

    Disable auto-p is a method but not the best solution. Because I need manually add a lot of p. It would be nice when i press "Enter" in visual editor, it can automatically add <p> in HTML source code, then I can remove useless p in HTML editor.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic