• 0

Remove unwanted "p tags"


Question

Posted · Report post

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

3 answers to this question

  • 0

Posted · Report post

Hi,

 

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>

</div>

 

Do this:

 

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

 

Do the same with shortcodes too.

 

Instead of:

 

[my shortcode

width="10000px"

height="1000px"]

Hello

[/myshortcode]

 

Do this instead:

 

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

 

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

 

[pl_raw]

My Code/shortcode...

[/pl_raw]

 

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
  • 0

Posted · Report post

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
  • 0

Posted · Report post

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