Custom class for my li
-
Hi There
I have downloaded a theme that uses this code to produce the links for my main nav –
<?php $i = 1; while ( have_posts() ) : the_post(); echo '<li><a href="#block';?><?php echo $i; ?> <?php $i++; ?> <?php echo '" title="'; ?> <?php the_title(); ?> <?php echo '">'; the_title(); echo '</a></li>'; ?> <?php endwhile;
I wish to add the variable $i to the li class so I get different class for each li, or really any other variable that will help me style each one of them differently.
How can I do that?
I tried so many variations so far….
Thanks ??
Guy
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘Custom class for my li’ is closed to new replies.