Remove unwanted "p tags"

4 posts in this topic

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 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.

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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • Mass Apply a template to Tag Archives
      By mno+
      Is there a way to mass apply a template to all tag archives?
      We are using Powerloop
    • remove date/ commets postpins
      By rosana
      How I can remove date and comment on all posts by postpins?
    • Don't Want Social Like Buttons in PopThumbs Section - How To Remove?
      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 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
    • remove space under nav bar?
      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
      Thank You,
    • Remove arrows on quickslider
      By thesongchanneler
      I know this is a simple question, but I could not find it explained on the forum. I simply want to remove the arrows from my quickslider. What do I input? And *where* exactly do I input it? in the edit area, under "custom styling classes"? "Inline CSS Styling"? Whatever is the absolute easiest way, please... thank you :)