Jump to content


This topic is now archived and is closed to further replies.


Remove unwanted "p tags"

Recommended Posts


I have a lot of extra p tags that are being generated and I need to remove them because that are adding extra space to my content.  Is there any way to do this?  I targeted the element with a class then drilled down to the p tag but nothing worked.  Any help is appreciated.  The url is http://www.inktopgraphics.com/deals/ where "order now" is too far down due to p tags.

Share this post

Link to post
Share on other sites



There are two ways to remove unwanted <p>..</p> tags in Wordpress.


1. Have your code all on one line, especially shortcodes. For example:


Instead of this:


<div class="blah">

<h1>Hello World!</h1>



Do this:


<div class="blah"><h1>Hello World!</h1></div>


Do the same with shortcodes too.


Instead of:


[my shortcode






Do this instead:


[my shortcode width="10000px" height=1000px]Hello[/myshortcode]


2. You can wrap your content inside the [pl_raw] shortcode like this:



My Code/shortcode...



However, the [pl_raw] shortcode will only work once per post/page and in the Wordpress content editor. It will not work on sections.

Please search our forums, before posting!

Share this post

Link to post
Share on other sites

thanks for the help but there are still there.  You cannot really ad the code to one line in the text box editor because it isn't wide enough.  Can I use "display:none" on them?  and if so what would I target? 

Share this post

Link to post
Share on other sites

What do you mean display: none ? How is that going to stop Wordpress from adding p tags or linebreaks ?

It doesn't matter that the TextBox area isn't largest enough, it will just scroll when you start adding your HTML/shortcode on one line.

Please search our forums, before posting!

Share this post

Link to post
Share on other sites

  • Similar Content

    • sophia@wearrose.com
      By [email protected]+
      Hi im using the Journey template and they automatically use a line to separate the sections. I want to remove it. I guess its a border but I cant figure out how to get rid of it for the life of me. HELP?! 

    • mno
      By mno+
      Is there a way to mass apply a template to all tag archives?
      We are using Powerloop
    • rosana
      By rosana
      How I can remove date and comment on all posts by postpins?
    • Fish-Owl-360
      By Fish-Owl-360
      I have a client who doesn't want the Social Like Buttons at the bottom of the PopThumbs Section pop up images.  I have explored every Pagelines DMS Setting, Word Press Setting, Pro Tools Settings; literally Everywhere in the site and can not find a way to remove these Twitter and Facebook buttons.
      Please tell me this is not so!  How can there not be an option to remove these.  Not all clients want social sharing/liking, and the extra clutter that goes with it.  If there is no way to remove these buttons from the PopThumbs Section, is there an alternative section I can use (Free/or Purchased)?  Either way I need a solution fast.  The client is getting angry.
      That link above is just an example site (not the client's site).  Just click on the PopThumb 1 and see the Bottons for Twitter and Facebook at the bottom.  I need those Gone.  Please help.
      Derek Bentley
      DMS Debug InfoWordPress Version 4.1.1 WordPress Debug Disabled Multisite Enabled No Current Role Administrator Framework URI http://designbentley.com/wp/wp-content/themes/dms/dms Framework Version PHP Version 5.5 WP_DEBUG No WP memory limit 40 MB WP MAX memory limit 256 MB PHP memory limit 256 MB Mysql version 5.5.32 WP Max Upload Size 50 MB PHP POST Max Size 50 MB PHP Max Execution Time 30s PHP type Cgi-fcgi WebServer software Apache/2.4.12 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4 mod_fcgid/2.3.10-dev PHP User Posix functions are disabled on this host. Not necessarily a problem, but if the user needs FTP/SFTP to install plugins/themes then creating CSS files might be an issue. OS Linux Installed Plugins contact-form-7/wp-contact-form-7.php dms-dev-tools/dms-dev-tools.php dms-plugin-pro/dms-plugin-pro.php pagelines-updater/pagelines-updater.php wordpress-seo/wp-seo.php
    • thesongchanneler
      By thesongchanneler
      Another simple question, I'm sure. Just too much space under my nav bar on home page (right at top, below my banner)....    it's the space under the nav bar, and above my "template" which isn't really a template anymore, but 3 columns. How to remove the space? Please view at devorakalma.com
      Thank You,