Forums

Issue Displaying Category of Posts (1 post)

  1. mibsolutionsllc
    Member
    Posted 2 years ago #

    I am using the following code to try and display posts from only a certain category horizontally in three rows. I have the horizontal display issue figured out (using css) but with the following code it displays *all* posts and not *posts from specific category*.

    <?php query_posts('showposts=5'); ?>
    <?php query_posts('cat=7'); ?>
    <?php $posts = get_posts('numberposts=5&offset=0'); foreach ($posts as $post) : start_wp(); ?>
    <?php static $count1 = 0; if ($count1 == "5") { break; } else { ?>
    
    <?php the_title(); ?>
    <?php the_content(); ?>
    
    <?php $count1++; } ?>
    <?php endforeach; ?>

    Any help would be greatly appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.