WordPress.org

Ready to get started?Download WordPress

Forums

Blog to display one category/omit that category (2 posts)

  1. colorspace
    Member
    Posted 9 months ago #

    The first part of my question has essentially been answered with this: http://wordpress.org/support/topic/how-to-display-blog-page-with-one-category

    But what I now want to know is how do I set up my main blog to omit that category?

    Basically I'm trying to have two blogs: 'Stories' and.. one containing everything else. 'Stories' won't show the other categories and the main blog won't show 'Stories'.

    The code I'm using is below:

    get_header();
    
    if ( is_page() ) {
    $paged = get_query_var('paged') ? get_query_var('paged') : 1;
    query_posts( 'post_type=post&paged=' . $paged );
    }
    
    ?>
    <div id="main" class="site site-with-sidebar">
    <div id="content" class="site-content"><?php
    
        if ( have_posts() ) :
    
            while ( have_posts() ) : the_post();
                /**
                 * Include the Post-Format-specific template for the content.
                 */
                get_template_part( 'content', get_post_format() );
    
            endwhile;
    
            if ( $wp_query->max_num_pages > 1 ) :
                fluxus_content_paging();
            endif;
    
        else :
    
            get_template_part( 'no-results', 'index' );
    
        endif; ?>
    </div>
    
    <?php get_sidebar( 'blog' ); ?>
  2. vtxyzzy
    Member
    Posted 9 months ago #

    Check the Blog in Blog plugin.

Reply

You must log in to post.

About this Topic