• I just wanted to show all the posts in a perticular catagory.
    I used following code
    —————————————-
    <?php
    $drafts=0;
    $posts = $wpdb->get_results("SELECT ID, post_author, post_date, post_title, post_category, post_excerpt, post_name, post_status FROM $tableposts WHERE post_category='8' ORDER BY post_date DESC");
    foreach ($posts as $post) {
    if ($post->post_status == "publish") {
    ?>
    <li class="even">" rel="bookmark" title="Permanent link : <?php the_title_rss() ?>"><?php the_title(); ?>

    </span>

    <?php
    } else { $drafts++;}
    }
    }
    ?>

    —————————————-
    But the above code shows only 4 posts from that catagory.
    I want all the posts , how can I do it?
    Thanks in advance !

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘posts in the same catagory’ is closed to new replies.