Add code to the_content()
-
Hi all,
I have what seems like a simple problem.
I want to insert
the_date()
right before the closing</p>
inthe_content()
.I’ve seen a lot of examples of simple
add_filter
solutions that will insert text before/after, but none that will insert code between those<p>
tags.Basically, I want my output to look like this:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque porta, felis vel volutpat. 12-March-2011.
If I just write:
the_content()
the_date()
I obviously get that closing paragraph tag kicking the date to the next line. I’ve tried writing a function using
get_the_content()
, but of course that sends the content out unformatted, which doesn’t really work either.Anyone got any ideas?
Thanks
Terry
- The topic ‘Add code to the_content()’ is closed to new replies.