WordPress.org

Ready to get started?Download WordPress

Forums

Put posts in ordered list in custom page template (1 post)

  1. el_wilson
    Member
    Posted 2 months ago #

    I’m making some changes to waldronlab.org/publications, and could really use some help on this issue:

    I’m trying to change the way I update his publications list. Currently, I just add new ones in the text editor, but he would like to add them himself without having to mess with any HTML.

    My plan was to create a custom page template that only showed posts from the category “Publications.” That was easy, I just made a new page template with the code <?php query_posts( ‘cat=2’ ); ?>, and now the posts show up just fine. The thing I don’t know how to do is make each post a list item in an ordered list.

    I had hoped I could use:

    <ol reversed>
    <li><?php query_posts( 'cat=2' ); ?></li>
    <ol>

    …but all that did was group all of the posts as one list item. I don’t know what to do. Could someone help me with this?

Reply

You must log in to post.

About this Topic