Hello everyone. I need a small help with wordpress and php codes. I have a featured posts slider on my homepage and here is the code for it - <?php $getcat = get_option('dynata_slider_category'); if($getcat=="all" || $getcat=="All Categories"){ $querycat = ""; } else{ $querycat = "&category_name=" . $getcat; } ?> <ul> <?php query_posts("showposts=3" . $querycat);?> <?php while (have_posts()) : the_post(); ?> <li> <?php if(get_post_custom_values("feature")){ ?> <img src="/wp-content/uploads<?php $values = get_post_custom_values("feature"); echo $values[0]; ?>" alt="<?php the_title(); ?>"/> <div><a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title_attribute(); ?>">Read Full Article</a></div> <div><?php the_title_attribute(); ?>"</div> <?php } ?> </li> <?php endwhile; ?> Code (markup): but the problem is that in this loop, every post and its image appear at the same position as a slideshow. BUT What When I Want To Display Each Post With Different Style ? Like i want the featured posts to appear in 3 boxes. They all are not at the same place, so they each have different DIV style (position, padding, margin, left, right, z-index all are different for different box) So how do i add different DIV style in that code ?
what more do i need ? that part of code is enough i think because its the part where i am having problem. you don't need anything else in a wordpress file to show posts
hmmm ok i did it myself by adding a variable in the while loop which increases on every loop and used it in the div. By the way, Thanks s_ruben for sparing your time