Support » Themes and Templates » make photoblog list only from 1 category

  • Hi. Can anyone help me limit this code so the “previous” and “next” links only point to category 3?

    I’ve searched the forum and docs and am hung up but I’d like to learn if someone knows how.

    Thanks!

    <div class=”entry”>

    <!– content with link to previous post –>
    <?php global $post, $tableposts;
    $previous = @$wpdb->get_var(“SELECT ID FROM $tableposts WHERE post_date < ‘$post->post_date’ AND post_status = ‘publish’ ORDER BY post_date DESC LIMIT 0, 1”);
    if ($previous) {
    $link = get_permalink($previous);
    echo ‘‘ . $post->post_content . ‘
    ‘;
    } else {
    the_content(‘[more photos]’);
    } ?>
    </div>

  • The topic ‘make photoblog list only from 1 category’ is closed to new replies.