• I’m trying to set it up so that on my main page, you only see one category. I know that you can use the code:

    <?php
    if (empty($cat)) {
    $cat = ‘numberofcategory’;
    }
    ?>

    but if i do that, it’ll prevent me from viewing future posts. Basically it screws with my archives. Does anyone know of a way I can code it so that I can show one category on the main page while allowing for future posts to be seen at the same time when I goto the category?

Viewing 4 replies - 1 through 4 (of 4 total)
  • <?php
    if (empty($_SERVER['QUERY_STRING'])) {
    $cat = 'numberofcategory';
    }
    ?>

    Thread Starter lawtai

    (@lawtai)

    that doesn’t seem to work with 1.22

    Works fine on my 1.2.2 setup. Where are you placing it in your page template? There *may* be an issue here with the Kubrick theme (which it appears you’re using).

    Thread Starter lawtai

    (@lawtai)

    oh heh i’m using it on another template that i’m making for another site. it actually does work. thing is, if i try to go through the calendar, it’s not showing my future events. so basically archives on future events don’t exist yet. but the code you gave actually does only display 1 category on the main page. thanks for that piece of code.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Future post and single category view’ is closed to new replies.