Filtering the_content();
-
Is there anyway I can “filter” the output of
the_content();
?I run a web comic, and I was hoping to put a little box underneath the comic for visitors to paste into a blog, a Myspace, etc, and it would basically be the HTML code for an image. It would have to be not parsed by the browser, however, so it would look like
<a href="<?php the_permalink(); ?>"><?php the_content(); ?></a><a href="https://mildlyhotpeppers.com">MildlyHotPeppers.com</a>
(I hope this doesn’t get rendered. /edit – it seems like it did get rendered…to clarify the left angle brackets are actually & lt; without the space and the right angle brackets are & gt; without the space./)
Where I have
<?php the_content(); ?>
, however, I was hoping I could sort of filter the content. As of now, each post for as comic looks like `<img src=”___” alt=”___” / >
`, and so I would like to get rid of the <p> tags and also replace the < with & lt; and the > with & gt; (I added spaces to they wouldn’t get parsed) so that the output of the php isn’t parsed as HTML.
- The topic ‘Filtering the_content();’ is closed to new replies.