Browser is putting in a p tag and ignoring my span: <div class="about-hero"> <h2><span class="accel"><?php echo $excontent[0] . " "; ?></span><?php echo $rebuild; ?> </h2> </div>
in inspect element I get:
please ignore the second h2… Any ideas why its putting in a p tag instead of using the span and h2?
head bang… added // $new_string = preg_replace(‘/[^a-zA-Z0-9\s]/’, ‘’, $content); and saw 2 p on either side of content from WP. Did not see it when I echoed the $content since it applied the p tags I guess I am new to this… So, I added $content = strip_tags($content); and it worked… content is teh string from get_the _content() before I explode() it…head bang… I thought $content = apply_filters( ‘the_content’, get_the_content() ); would take care of tags etc. Lots to learn about WP Thanks to @felgall and @ralphm !