Remove ONLY P tags in excerpt, not code snippets though.
-
I know that calling the except this way: <?php echo get_the_excerpt(); ?> will make it plain text, hence stripping the <p> tags, but I have a code snippet in there too that I don’t want to get stripped… it goes like this:
I’ve been lucky enough to work on lots of cool projects over the years, and with very talented people. Downright likeable, too – John Ford a rare exception; his being dead made him very difficult to work with. Here are some highlights. And because no list of credits is complete without end-title music, here you go, [haiku url="https://tcurranmusic.com/new/wp-content/uploads/2011/05/12OH_END-TITLE_EDIT.mp3"] to some special musical accompaniment.
So how would JUST strip the P tags from my excerpt and allow that brackets call to still happen?
- The topic ‘Remove ONLY P tags in excerpt, not code snippets though.’ is closed to new replies.