WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] exclude category in Mixfolio template

[Resolved] exclude category in Mixfolio template

  • Hello,

    i wanted to exclude one category from the dislayed posts in the Mixfolio template.

    I guess I already find the right part of the code (main index template) but the way I entered the exclude code doesn’t work:

    THE CODE:

    <?php
    					$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
    
    					$grid_args = array(
    						'posts_per_page' => get_option( 'posts_per_page' ),
    						'paged' => $paged,
    					);
    
    					$grid_query = new WP_Query( $grid_args );
    
    					while ( $grid_query->have_posts() ) : $grid_query->the_post();
    				?>

    I entered “cat=-1” in this code area

    get_option( 'posts_per_page' ), 'cat=-1',
    						'paged' => $paged,

    How do I have to write it?
    The code doesn’t look exactly like in the wordpress documentation.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] exclude category in Mixfolio template’ is closed to new replies.
Skip to toolbar