Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1008890

    HI,

    How turn it off the wp’s wpautop feature in codeblock?

    Even using the codeblock to insert scripts the <p> tags are inserted in my code.

    The database _posts / post_content creates an absurd volume of <p> tags.

    I need to always go to _postmet / _aviaLayoutBuilderCleanData to copy the clean code and manually replace it in _postmet.

    I tried inserting the code below into functions.php but I was not successful.

    // Disable extra p tags in WP shortcodes
    remove_filter( 'the_content', 'wpautop' );
    remove_filter( 'the_excerpt', 'wpautop' );

    Any suggestion?

    #1008945

    Hey CloudChoice,

    Here are some links for you to consider

    https://wordpress.stackexchange.com/questions/6798/remove-filter-the-content-wpautop-is-not-working

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1008991

    Appreciate,

    However the links I’ve seen and one of the solutions is 2012, it does not work and makes the situation worse generating more <p> tags.

    add_filter( 'the_content', 'wpautop' , 99);

    Any other solution?

    #1009271

    Hi CloudChoice,

    Have you tried like this

    
    remove_filter( 'the_content', 'wpautop' , 99);
    

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1009325

    Hi,

    Unfortunately without success.

    I put snippets of code that is in CODEBLOCK.
    It is easy to see that with each simple click on the Upgrade button of the page (without changing anything at all) the tags will multiply (1,2,4,8,16,32,64,128 …) after some modifications, the page does not open due to lack of memory and consumes more than 1Gb to be executed.

    THE ORIGINAL CODE

    box: '<div class="fileuploader-items">' +
    						  '<ul class="fileuploader-items-list">' +
    								'<li class="fileuploader-thumbnails-input"><div class="fileuploader-thumbnails-input-inner thumbnail_after exame_gravidez_box">+</div></li>' +
    						  '</ul>' +
    					  '</div>',
    				item: '<li class="fileuploader-item">' +

    After the first save

    			
    				box: '</p>
    <div class="fileuploader-items"><p>' +
    						  '</p>
    <ul class="fileuploader-items-list">' +
    								'</p>
    <li class="fileuploader-thumbnails-input">
    <div class="fileuploader-thumbnails-input-inner thumbnail_after exame_gravidez_box">+</div>
    </li>
    <p>' +
    						  '</ul>
    <p>' +
    					  '</div>
    <p>',
    				item: '</p>
    <li class="fileuploader-item">' +

    After the second save

    
    				box: '</p>
    <p>
    </p>
    <div class="fileuploader-items">
    <p>' +
    						  '</p>
    <p>
    </p>
    <ul class="fileuploader-items-list">' +
    								'</p>
    <p>
    </p>
    <li class="fileuploader-thumbnails-input">
    <br />
    <div class="fileuploader-thumbnails-input-inner thumbnail_after exame_gravidez_box">+</div>
    <p>
    </li>
    <p>
    </p>
    <p>' +
    						  '</ul>
    <p>
    </p>
    <p>' +
    					  '</div>
    <p>
    </p>
    <p>',
    				item: '</p>
    <p>
    </p>
    <li class="fileuploader-item">' +

    After the third save

    
    				box: '</p>
    <p>
    </p>
    <div class="fileuploader-items">
    <p>' +
    						  '</p>
    <p>
    </p>
    <ul class="fileuploader-items-list">' +
    								'</p>
    <p>
    </p>
    <li class="fileuploader-thumbnails-input">
    <br />
    <div class="fileuploader-thumbnails-input-inner thumbnail_after exame_gravidez_box">+</div>
    <p>
    </li>
    <p>
    </p>
    <p>' +
    						  '</ul>
    <p>
    </p>
    <p>' +
    					  '</div>
    <p>
    </p>
    <p>',
    				item: '</p>
    <p>
    </p>
    <li class="fileuploader-item">'

    After the fourth save

    box: '</p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <div class="fileuploader-items">
    <p>
    </p>
    <p>
    </p>
    <p>' +
    						  '</p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <ul class="fileuploader-items-list">' +
    								'</p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <li class="fileuploader-thumbnails-input">
    <br />
    <br />
    <br />
    <div class="fileuploader-thumbnails-input-inner thumbnail_after exame_gravidez_box">+</div>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </li>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>' +
    						  '</ul>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>' +
    					  '</div>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>',
    				item: '</p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <li class="fileuploader-item">' +
    #1009535

    Hi CloudChoice,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Can you please specify the page where it is happening? And why do you have quotes and plusses in the code? Is it JavaScript you’re using there?

    Best regards,
    Victoria

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.