Show Search
-
Hi, I have two pages that I’d like to show search results. The first is the News page which shows all the posts on our site that have the Category set as News. This works fine.
The other would be a page called Press that would show all the posts that have the Category set as Press.
I’ve taken the page-news.php file as a starting point and renamed it page-press.php. But I’m not sure what to change in the php file so that it will pull up the results I want.
Here is the code from the php file:
<?php /* Template Name: Press Release */ ?> <?php get_header(); ?> <div id="page" class="container right-sidebar blog"> <div class="post column col9"> <?php query_posts('paged='.$paged.'&post_type=post');?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="entry-text"> <div class="post-meta"> <?php the_time('F j, Y'); ?> </div><div class="clear"></div> <h2><a>"><?php the_title();?></a></h2> <div class="thumb"><?php colabs_image('width=100&height=100');?></div> <?php colabs_custom_excerpt();?> <div class="clear"></div> <a>"><?php _e('Continue Reading','colabsthemes');?></a> </div> <hr class="column col9 separator"> <?php endwhile; ?> <?php else : ?> <?php _e('Sorry empty post','colabsthemes');?> <?php endif; ?> <?php colabs_pagination();?> </div><!-- .post --> <?php get_sidebar(); ?><!-- #sidebar --> </div><!-- #page --> <?php get_footer(); ?>[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
The topic ‘Show Search’ is closed to new replies.