Loop in UL, Li List
-
I’m a little stuck with a project I’m working on. I have a little experience but more advanced php is something I can’t create from scratch. I’ve looked around and tried a few things. but have not found what I’m looking for specifically.
I’ve worked with feature animation but never set one up from scratch before. I decided to give Roundabout by Fred LaBlanc. I have it working, but I have to enter the content manually into the list.
I have some code that will ender the thumb nail image of the newest article with a particular category checked (in the example code bellow I use “featured”). Unfortunately I haven’t worked out how to discriminate one list item from the other. I can’t just put that code into each LI tag because it fills the entire roundabout animation with the same article. I thought I might be able to have a single LI tag contained within the PHP that is looking up the category and have that generate a separate LI entry for each article with that feature selected and populate the roundabout with that. But I can’t get it to work.
There might be a simpler way. I’ll attach the code I’ve tried using (before I messed with it).
Link to my example. I’ll delete these when the issue is resolved.
<li> <?php query_posts('category_name=featured&showposts=1'); ?> <?php while (have_posts()) : the_post(); ?> <?php the_post_thumbnail(); ?> <?php endwhile; ?> </li>
Just a reminder, the roundabout code seems to need a separate Li tag for each article in the animation. It seems to me that I should be able to put the li tag inside
query_posts
and increate the number onshowposts
.
- The topic ‘Loop in UL, Li List’ is closed to new replies.