ThemeShaper Forums » Thematic


Show full posts from diff categories in Home Page

(3 posts)
  • Started 11 years ago by him
  • Latest reply from him
  • This topic is resolved
  1. him


    I have this static Home Page where I have set up 4 Columns to display content from 4 different categories. I want each column to show 4 full posts from a particular category. I guess I have to hard-code it into the area for each tab. I have been looking for a solution here, but found nothing related to category.

    Any ideas how I can make this work?

    Posted 11 years ago #
  2. hard code your columns and use get_posts()

    Posted 11 years ago #
  3. him

    Thanks a ton Helga. I got it up and running using one of the code from your link :

    $args = array( 'numberposts' => 5, 'category' => 1 );
    $lastposts = get_posts( $args );
    foreach($lastposts as $post) : setup_postdata($post); ?>
    <h2>"><?php the_title(); ?></h2>

    <div class="entry">
    <?php the_content(); ?>

    <?php endforeach; ?>

    But even though I specified a category - 'category' => 1 ); - it shows posts from all the categories and shows only the title. I thought the last line within div.entry were meant to show the full content.

    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.