• Resolved Speedingorange

    (@speedingorange)


    Hi,

    I am setting up a site for a freind. I run a few sites but am still very much a newbie to PHP. (better at seo)

    I am trying to make the viewport theme call only posts from a specific category for the slider.

    I have done some reading but whatever I try seems to generate errors.

    <?php if (have_posts()) : ?>
    
    				<?php while (have_posts()) : the_post(); ?>
    
    				<div class="panel" id="post-<?php the_ID(); ?>" title="<?php the_title() ?>">

    That’s the code that needs modification ( I hope) I have tried adding

    <?php query_posts(‘cat_ID=9’); ?> in front of the have posts string without success.

    Can anyone tell me where I am going wrong?

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

    (@speedingorange)

    Nevermind… I fixed it ??

    Should have been:

    <?php if (have_posts()) : ?>
    <?php query_posts('cat=9'); ?>
    <?php while (have_posts()) : the_post(); ?>
    
    <div class="panel" id="post-<?php the_ID(); ?>" title="<?php the_title() ?>">
    Alwyn Botha

    (@123milliseconds)

    Please mark thread as resolved so that

    – others with similar problem can see it as resolved and will read this thread for help if they have similar problem

    – people providing help see it as resolved and will not waste time reading this post.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Calling Posts from a Specific Category’ is closed to new replies.