• Resolved ekdor

    (@ekdor)


    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 on showposts.

    Site Under Development

Viewing 3 replies - 1 through 3 (of 3 total)
  • possibly try:

    <?php query_posts('category_name=featured&posts_per_page=6'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <li>
    <?php the_post_thumbnail(); ?>
    </li>
    <?php endwhile; ?>
    Thread Starter ekdor

    (@ekdor)

    Thanks. That code actually did the trick. But all the images were distorted in both horizontal and sometime vertical dimensions. Compressed beyond the images natural ratio. I suspect this is something to do with the original script. Thanks a lot again. Twice this week you have come to my aid!

    Will investigate it further tomorrow.

    Cheers,

    Thread Starter ekdor

    (@ekdor)

    Ok found I was missing a height value in my css for the roundabout. All working well now.

    @alchymyth, Thanks for your assistance once again.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Loop in UL, Li List’ is closed to new replies.