WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Exclude Category post in blog template (1 post)

  1. jeponkz
    Member
    Posted 1 year ago #

    Guys how can I exclude a specific category in the blog template?

    I think it has something to do here:

    <?php
    if ( get_query_var( 'paged') ) { $paged = get_query_var( 'paged' ); } elseif ( get_query_var( 'page') ) { $paged = get_query_var( 'page' ); } else { $paged = 1; }

    $query_args = array(
    'post_type' => 'post',
    'paged' => $paged
    );

    $query_args = apply_filters( 'woo_blog_template_query_args', $query_args ); // Do not remove. Used to exclude categories from displaying here.

    remove_filter( 'pre_get_posts', 'woo_exclude_categories_homepage' );

    query_posts( $query_args );

    if ( have_posts() ) {
    $count = 0;
    while ( have_posts() ) { the_post(); $count++;
    ?>
    <?php
    /* Include the Post-Format-specific template for the content.
    * If you want to overload this in a child theme then include a file
    * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    */
    get_template_part( 'content', get_post_format() );
    ?>

    <?php
    } // End WHILE Loop

    I need your help, what parameter should I include in the query.

    http://wordpress.org/extend/plugins/woocommerce/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.