the_content problems
-
I am trying to figure out why this code doesn’t work:
<h4><a class="info" href="<?php the_permalink(); ?>"><?php the_title(); ?> <span><?php the_content(); ?></span></a></h4>
I am assuming that it has to do with how the_content parses (but we all know what assuming does). I have tried a whole bunch of different work-arounds, but to no avail. it always seems to render the content like this:
<h4><a class="info" href="<?php the_permalink(); ?>"><?php the_title(); ?> </a><span></span><?php the_content(); ?></h4>
Also, I know it is a problem with the_content, because if I replace the_content with “Sample Content to Make Sure This Works,” it works just as I would expect where both the anchor and span tag wrap around both the_title and the_content.
I just want to get the content to appear within the span tags on one page, and hoping someone could shed some light on the subject.
Thank you,
Anthony
- The topic ‘the_content problems’ is closed to new replies.