Title: Multiple Forms
Last modified: August 21, 2016

---

# Multiple Forms

 *  Resolved [naveenkmoorthy](https://wordpress.org/support/users/naveenkmoorthy/)
 * (@naveenkmoorthy)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/multiple-forms-5/)
 * I’m using two forms for two custom post types. I successfully customized results
   page for one custom post. Here is my code
 *     ```
       <?php
               if (have_posts ()) {
   
                   while (have_posts ()) {
   
                       (the_post());
               ?>
               <?php if($_GET['s']=='uwpsfsearchtrg'){
                 //add your own result display here. or you can include the template here as well.
                 ?>
                 <a class="event-link" href="<?php the_permalink();?>">
                 <div class="resource-box">
                 <h4><?php the_title(); ?></h4>
                 <?php the_excerpt(); ?>
                 <ul>
                   <li><strong>Eligibility:</strong> <?php echo get_post_meta( get_the_id(), 'eligibility', true); ?></li>
                   <li><strong>Phone Number:</strong> <?php echo get_post_meta( get_the_id(), 'phone_number', true); ?></li>
                   <li><strong>Coverage Area:</strong> <?php echo get_post_meta( get_the_id(), 'coverage_area', true); ?></li>
                   <li><strong>Age Served:</strong> <?php echo get_post_meta( get_the_id(), 'age_served', true); ?></li>
                 </ul>
                 </div>
               </a>
                 <br>
           <?php
           }else{
   
             ?>
       ```
   
 * My question is how to filter the search results for the 2nd custom post?
 * [http://wordpress.org/plugins/ultimate-wp-query-search-filter/](http://wordpress.org/plugins/ultimate-wp-query-search-filter/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [naveenkmoorthy](https://wordpress.org/support/users/naveenkmoorthy/)
 * (@naveenkmoorthy)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/multiple-forms-5/#post-4496850)
 * Found it myself. I used a conditional statement like this
 *     ```
       <?php if ('post_resources'==get_post_type()) {
                   # code...
                 ?>
       ```
   
 * Thanks!

Viewing 1 replies (of 1 total)

The topic ‘Multiple Forms’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ultimate-wp-query-search-filter_fcfcfc.
   svg)
 * [Ultimate WP Query Search Filter](https://wordpress.org/plugins/ultimate-wp-query-search-filter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-wp-query-search-filter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-wp-query-search-filter/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-wp-query-search-filter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-wp-query-search-filter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-wp-query-search-filter/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [naveenkmoorthy](https://wordpress.org/support/users/naveenkmoorthy/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/multiple-forms-5/#post-4496850)
 * Status: resolved