Like others, I'm having issues with WP adding unwanted p tags in my code. I have a shortcode I created that is to simply just spit out my javascript and html when I use it. Everything works fine except WP is wraping each in p tags. Adding many lines of blank unwanted space. I have tried the solution here: Automatically added brs and paragraphs? to no avail. Here is what I have in my functions.php file
<?php
remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop' , 12);
remove_filter( 'the_excerpt', 'wpautop' );
/***************/
/**ShortCodes**/
/**************/
/*** Form to contact Us **/
function contact_us() {
return <<<HTML
<P> Here's the low down on what to do </p>
<link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css"/>\n
<link rel="stylesheet" href="http://studiocloud.com/css/validationEngine.jquery.css" type="text/css"/>\n
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>\n
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script>\n
<script src="http://cloudforms.co/js/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8"></script>\n
<script src="http://cloudforms.co/js/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>\n
<script type="text/javascript" src="http://cloudforms.co/js/html5placeholder.jquery.js"></script>\n
<form action="" id="signupform" name="signupform">
<input type="hidden" id="tid" name="tid" value=""/>
<input type="hidden" id="scid" name="scid" value="TPN02L48KAVJKVRD"/>
<input type="hidden" id="fid" name="fid" value="392"/>
<div class="box" >
<fieldset class="field_set""><legend>Contact Us For More Information</legend>
<label><span>First Name *</span><input type="text" id="firstName" name="firstName" class="validate[required] input_text" placeholder="First Name" ></label>
<label><span>Last Name *</span><input type="text" id="lastName" name="lastName" class="validate[required] input_text" placeholder="Last Name" ></label>
<label><span>Phone</span><input type="text" id="workPhone" name="workPhone" class="validate[optional] input_text" placeholder="Phone" ></label>
<label><span>Email *</span><input type="text" id="email" name="email" class="validate[required,custom[email]] input_text" placeholder="Email" ></label>
<label><span>Comments *</span><textarea name="item5" id="item5" class="message" placeholder="Comments" ></textarea></label>
<label><span></span>* Required Fields</label>
<label><input type="button" id="item7" name="item7" onClick="processContactUs(event)" class="button" value="Submit" ></label>
</fieldset>
</div>
</form>
<div class="modal"><!-- Place at bottom of page --></div>
HTML;
}
add_shortcode('contact_us','contact_us');
any ideas? using \n seems to get rid of unwanted br tags I was getting, but now still getting the p tags. thanks.