Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • This is css, mate. Whole, pure, 100% natural css.

    What you need is to make HORIZONTAL list. As you might see, there is an opening tag for

    • all of a sudden in my code. You need to close
    • after <?php echo $post->post_title;?> as well as .

      Then, you need to go Listamatic and find out how to make a horizontal list. As far as I’m already there, ah, what the heck:

      HTML
       <div id="navcontainer">
       <ul id="navlist">
       <?php
            $recent = new WP_Query("cat=5&showposts=8");
              while($recent->have_posts()) : $recent->the_post();?>
      
       <li><a href="<?php the_permalink() ?>" title="Permalink on <?php the_title_attribute(); ?>">
      <?php echo $post->post_title;?></li></a>
      <?php endwhile; wp_reset_postdata(); ?>
      
       </ul>
       </div>
      
      CSS
       #navlist li
       {
       display: inline;
       list-style-type: none;
       padding-right: 20px;
       }

    You need to get knowing WP_Query and The Loop.
    This is a simple loop, sorting Post by category:

    <?php
          $recent = new WP_Query("cat=5&showposts=8");
            while($recent->have_posts()) : $recent->the_post();?>
    
    <li><a href="<?php the_permalink() ?>" title="Permalink on <?php the_title_attribute(); ?>">
    <?php echo $post->post_title;?>
    <?php endwhile; wp_reset_postdata(); ?>

    where cat=5, is category id, and showposts=8 is number of posts. Instead of cat id you can use Category_name=blog.

    Not sure how your images are set.

Viewing 2 replies - 1 through 2 (of 2 total)