Multiple Forms
-
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?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Multiple Forms’ is closed to new replies.