Forums

problem with the loop in css menu (1 post)

  1. Travel-Junkie
    Member
    Posted 5 years ago #

    hey there,

    i added a css horizontal drop down menu at the end of header.php. now i wanted to use the loop, which i only have a basic understanding of, to automatically add the 9 latest posts to the 2 categories each i have displayed in the menu. ok, don't think i described this very clearly. here's the code i have in the menu:

  2. <?php _e('the trip'); ?>
  3. <li class="bg"><?php _e('about me'); ?>
    <li class="bg"><?php _e('travel map'); ?>
    <li class="bg"><?php _e('equipment'); ?>
    <li class="bg"><?php _e('faq'); ?>
    <li class="bg"><?php _e('support me!'); ?>
    <li class="bg"><?php _e('beach bum'); ?>
    <li class="bg"><?php _e('contact'); ?>
    <li class="bg"><?php _e('credits'); ?>
    <li class="bg"><?php _e('travel tips'); ?>

  4. <?php _e('travelogues'); ?>
      <?php query_posts('category_name=travelogues&showposts=9'); ?>
      <?php while (have_posts()) : the_post(); ?>
      <li class="bg">"><?php the_title(); ?>
  5. <?php endwhile; ?>
    <li class="bg"><?php _e('archive'); ?>

  6. <?php _e('gallery'); ?>
      <?php query_posts('category_name=gallery&showposts=9'); ?>
      <?php while (have_posts()) : the_post(); ?>
      <li class="bg">"><?php the_title(); ?>
  7. <?php endwhile; ?>
    <li class="bg"><?php _e('archive'); ?>

    <li class="nomargin"><?php _e('community'); ?>

    the thing is that it worked perfectly for the menu. it displayed everything correctly. it just totally mangled up my blog. when i still had it uploaded like this it didn't matter what link i clicked, it only ever displayed the same post. here's a link to the site without the loop part in the menu: http://www.travel-junkie.com/travelogues/
    i really appreciate any help. don't know what else to do and a solution to this would save me so much time.
    cheers,
    bo

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.