• andi_g

    (@andi_g)


    PLEASE remove the automatic insertion of <p> </p> in html entry fields !!!

    I am sick of working half an hour just because wordpress inserts p tags in wrong and idiotic positions.

    And than tell the customer: you can insert your code here, but maybe wordpress inserts wrong p tags and the content is formated wrong, but you can not fix it.

    even easy contact forms sends the mail message with p tag at the beginning and the end -> whats up ?? an i then have to hack the code of the plugin just to remove them … argg

    remove this shit!

Viewing 14 replies - 1 through 14 (of 14 total)
  • esmi

    (@esmi)

    What html entry fields exactly?

    Thread Starter andi_g

    (@andi_g)

    every html entry field concerning the content of pages, articles and so on

    i just have inserted some code to a html page which starts with a div, but wordpress decided that it wants the article to be started with a p tag and inserts one before my div. although a p tag at this position makes absolutely no sense. now i have a gap at the top of the page … and i cannot remove it … that is ridiculous

    Thread Starter andi_g

    (@andi_g)

    i just realized that this behavor has something to to with tinyMCE advanced … anyway .. the automatic p tag insertion in wordpress is nerve-racking

    fonglh

    (@fonglh)

    It’s your site, so you have to disable it yourself. The codex already explains how to do it.

    https://codex.www.ads-software.com/Function_Reference/wpautop

    k_nitin_r

    (@k_nitin_r)

    There’s a plugin to disable the automatic P-tag insertion too, but I usually find it included in the themes that require it. Perhaps using nltobr would be more to your liking?

    nireder497

    (@nireder497)

    Yeah, I hate this too! >.<

    It screws up my formatting every time I switch from visual to HTML editor for example. Or when I’m using a page builder from a 3rd-party and I need to manually edit a few things it will auto insert the <p> tag messing up the look of my page/post!

    Thread Starter andi_g

    (@andi_g)

    @k_nitin_r: Plugin to disable automatic p-tag insertion didn’t work for me. Up to now i didn’t find a solution for that.

    I REALLY don’t understand why there is no option in the admin to switch on and off automatic p insertion. AND switch on an off showing p tags and br tags in the html mode of the editor – so that i know which code is really there.

    so many people have problems with this, why don’t you adress this, developers ??

    esmi

    (@esmi)

    Thread Starter andi_g

    (@andi_g)

    ok this removes the p-insertion from content and excerpts, but, for example, if i use easy contact forms and write a test mail, the mail text is also wrapped in <p></p>. This has also something to do with automatik p insertion. How to remove that ?

    And: why do i have to make changes in php to set such a basic option ?

    an the other problem is not solved with that: i want to see p tags in html mode of the editor. i simply want to see the code as it is!

    you can do that by installing tinyMCE advanced, but with the show-p-tag option of tinyMCE advanced other strange p-insertion problems come in -> so tinymce advenced is not a good option.

    k_nitin_r

    (@k_nitin_r)

    I’m not too sure if the P tags being inserted are by WordPress for the contact forms… if it is, there’s bound to be a filter like the_content and the_excerpt to take away the wpautop filter.

    The reason why we have wpautop is that HTML ignores line breaks so we’d either have to use BRs, which aren’t all that nice from a styling perspective from web designers that like to play with CSS, or P tags.

    P tags are a trade-off and there are very few people who find them an annoyance.

    You could be right about having it as a setting – the setting can be added by a plugin.

    Thread Starter andi_g

    (@andi_g)

    ok again … automatic processing / formating of the html code is annoying for a lot of people. the html code should be accepted as the user wrote it !! what a paternalism to assume the user is not able to enter html as he/she want it to be.

    All the ways to stop automatic p insertion / br removement do not word. Disable-p-insertion plugin does not work. inserting remove_filter(..) in the funktions.php does not work. the only thing that really disables this is commenting out the content of the wpautop function itself. but thats not the job of the user !

    How can one be that ignorant ? Insert an Option which controls if the content is filtered !!!!! An set it (globally) off by default !!!!!

    Damned …

    It’s possible to disable the auto <br /> and <p> to specific templates.

    Simply duplicate any page template then add the following to the source.

    <?php
    		remove_filter( 'the_content', 'wpautop' );
    		remove_filter( 'the_excerpt', 'wpautop' );
    	 ?>

    This way non web designers can still have the benefits of the automatic tag insertion and web designers can select the template with the feature turned off.

    I think I am having this issue as well. Do you add this code to the theme, or where?
    After ruling out that this is a problem with the theme I am using, I ran the code through an html validator and got this:

    https://cld.wthms.co/8taL

    My footer has bumped all the way to the top of the site and is pushing the content to the left hand side. Is it possible for the <p> tags (highlighted in red) to be causing this?
    The site is https://www.circuitmedia.com. Any help would be appreciated.
    Thanks

    @sover: As per the Forum Welcome, please post your own topic. This topic is 9 months old. Added to which, this is not a support forum.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘automatic p tag insertion’ is closed to new replies.