• Resolved iamharlan

    (@iamharlan)


    Hey folks…

    I’m putting together a custom wordpress theme for a client…and am very new at it. I’ve got everything starting to come together, but I want to be able to create a page that displays a list of posts from a certain category.

    I’ve got this working almost the way I want. Here’s my code…

    <div class="newspage"><?php query_posts('category_name=News&showposts=5'); ?>
    <?php while (have_posts()) : the_post(); ?>
            <strong><a href="<?php the_permalink(); ?>">
              <?php the_title(); ?>
              </a>  </strong>
    <?php endwhile; ?>
    
    </div>

    And here’s the link to it working…

    I’m having issues with two things. One…I have the content showing up without actually calling for it. This leads to my second issue…I want to show the excerpt after the title, and I want to be able to style it. It seems to be just one block of text now, and I can’t style it individually.

    What am I doing wrong here?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter iamharlan

    (@iamharlan)

    EDIT: I think I have it figured out now how to style them individually….but I have a new problem.

    I have multiple posts in that category…but only have the title from one post showing up. The other post’s content is showing up, but not the title.

    What’s up?

    Here’s my code:

    <div class="newspage"><?php query_posts('category_name=News&showposts=5'); ?>
    <?php the_post() ?>
    	<div id="post-<?php the_ID() ?>" <?php post_class() ?>>
    	  <div class="newsposttitle"><strong><a href="<?php the_permalink(); ?>">
              <?php the_title(); ?>
              </a>  </strong></div>
    	<div class="newsposttext typeface-js" style="font-family: Helvetiker">
    
    <?php the_excerpt() ?>
    Thread Starter iamharlan

    (@iamharlan)

    Anyone?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Simple Category Page Help’ is closed to new replies.