• Hi, does anyone know how i can add li tags to the content in the code below?

    $posts = query_posts(‘posts_per_page=10&post_type=article_type&orderby=desc&tag=ifas’);
    foreach($posts as $post){

    echo apply_filters (‘the_content’, $post->post_content);

    }

    any help would really be appreciated.

    Kieran

Viewing 2 replies - 1 through 2 (of 2 total)
  • do you mean you want to wrap the output into an ul tag, and each content into a li tag?

    try for example:

    $posts = query_posts('posts_per_page=10&post_type=article_type&orderby=desc&tag=ifas');
    echo '<ul>';
    foreach($posts as $post){
    echo '<li>';
    echo apply_filters ('the_content', $post->post_content);
    echo '</li>';
    }
    echo '</ul>';
    Thread Starter fourstack

    (@fourstack)

    That is exactly what i was after, thank you…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding li tag to posted content’ is closed to new replies.