• Resolved structure5

    (@structure5)


    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_file as 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() via wp-includes/post-template.php?

Viewing 1 replies (of 1 total)
  • Thread Starter structure5

    (@structure5)

    Due to time constraints I simply modified my layout so that the <p> tags generated by wordpress are confined within a <div>, then applied styles accordingly.

    Not optimal, but workable.

Viewing 1 replies (of 1 total)

The topic ‘the_content without encapsulating <p> tags?’ is closed to new replies.