WordPress loop looping empty div / li ?
-
Hi , there is many people who have the same problem with me.. But i just can’t understand the solution. Because I’m just new to wordpress and coding..
Anyway , this is my wordpress loop :
[mod: added backticks]
<ul> <!-- wp query starts --> <?php $the_query = new wp_query('category=offerings posts_per_page=10'); ?> <?php if ($the_query->have_posts() ) : while ($the_query->have_posts() ) : $the_query->the_post(); ?> <li><a>"><?php the_title();?></a></li> <li> <?php endwhile; else: ?> <?php _e('Sorry, no posts matched your criteria.'); ?> <?php endif; ?> <?php wp_reset_query(); ?> </li> </ul>
This loop making is creating
<li> title </li>
but the thing is it keep generating empty
<li> </li>
after one title post , anyone care to point where i did wrong ?Thanks, PS sorry for my bad English.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘WordPress loop looping empty div / li ?’ is closed to new replies.