Here is how to remove the p tag from automatically generating when you use the_content.
In the template file you want to strip the p tag from simply add the following code anywhere above the “the_content” area.
// Prevent WordPress from adding <p> tags
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );