WordPress.org

Support

Support » Plugins and Hacks » Posts on Pages depending on categorys

Posts on Pages depending on categorys

  • Hello Community,
    I’ve searched a long time and didn’t find the solution that fits for my problem.
    I want my users to post in a category called “reports” and then publish these postings on a page (not in the main timeline of my blog). Is there a possibility to do this?

    I’ve found a solution which uses the template of a page, but the posts appear in the timeline of my mainblog and there is no possibility to add pagination…

    Please help.

    David

Viewing 1 replies (of 1 total)
  • @mercime
    Participant

    @mercime

    The simplest thing would be to exclude that “reports” category from showing up in your “regular” blog.
    So in your index.php, just before the WP loop ( <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> )
    you place this code

    <?php query_posts($query_string . '&cat=-9'); ?>

    where the negative number 9 is the ID# of the “reports” category in your installation so that it won’t show up in the regular post pages. You could also add the code I gave above to your archive.php so that the only way people can access those posts in “reports” category is via category template.

Viewing 1 replies (of 1 total)
  • The topic ‘Posts on Pages depending on categorys’ is closed to new replies.