Filter Gallery still shows "ALL" posts…
-
I have a filter gallery as part of a theme that I’ve modified per my clients instructions. He wanted instead of “ALL” posts showing on page load, a category page named “Selects”. I hard coded the nav menu as follows:
<ul class="filter"> <li><a class="active" href="#" data-filter=".selects">Selects</a></li> <li><a href="#" data-filter=".television">Television</a></li> <li><a href="#" data-filter=".feature">Feature</a></li> <li><a href="#" data-filter=".commercial">Commercial</a></li> </ul>
The code that displays the menu items is as follows:
<?php $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; $args = array( 'posts_per_page' => -1, 'offset'=> 0, 'post_type' => 'portfolio'); $all_posts = new WP_Query($args); while($all_posts->have_posts()) : $all_posts->the_post(); ?>
If I try to add the
'category' => 'selects'
I get a blank page. Is there a way to load the page without showing ALL of the posts but rather the first link?Thanks
P
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Filter Gallery still shows "ALL" posts…’ is closed to new replies.