the_content without encapsulating <p> tags?
-
I have every bug worked out of my template so far with this one being the exception…
In some cases I am not a big fan of WordPress trying to outsmart me and encapsulating output between pre-defined tags. It causes me to have to hack up my nicely formatted CSS to make it work.
For example,
<?php wp_list_categories(); ?>encapsulates output in a fully structured unordered list. This can be partially avoided by setting an empty title_li value like so<?phpwp_list_categories('title_li='); ?>. In this way I can just work with<li></li>encapsulated elements which just happens to be OK in my current case.However,
<?php the_content(); ?>only takes$more_link_text, $strip_teaser, $more_fileas it parameters and I see no way to prevent it from being encapsulated in<p>tags or alternatively encapsulating it with my own custom tags.When I attempted to use
<?php apply_filters('the_content',get_the_content( $more_link_text, $stripteaser, $more_file )) ?>, it simply returned nothing.How can I achieve this behavior? Would it be best to simply edit
the_content()viawp-includes/post-template.php?
The topic ‘the_content without encapsulating <p> tags?’ is closed to new replies.