Looking for support? You can access the support system via your account.
Forums › Forums › Search & Filter Pro › Custom theme not working
- This topic has 6 replies, 2 voices, and was last updated 5 years, 3 months ago by Trevor.
-
Mike Stover(Private) December 31, 2018 at 7:16 pm #197731
Hi, I purchased this and need a little guidance. Works ok on different theme, but not on a custom theme. I have the search form set as a widget on my archive page. When you choose a drop down it filters by your selection, and outputs the search.php, but you can not select another option to filter.
basically my archive.php and search.php pages are identical. the filter works on archive.php but no search.php. is there something i need to do to my functions.php or search.php to get the 2nd search to function properly?
Trevor Moderator(Private) December 31, 2018 at 9:27 pm #197732Please note that we are now into a holiday period in the UK. We will be working for some of this period, but replies may be delayed at times.
I would need to see this in action. Are you able to send me a live link/URL to your search page (not working, plus suggested search sequence to see the issue) so I can take a look?
If it works on the first search as it goes to a new page, but a second search on the same page (probably using Ajax) does not work, then the Ajax Container (set to #main by default), will most likely be wrong.
Mike Stover(Private) January 9, 2019 at 7:17 pm #198571the search works by searching categories. here is the url http://portal.timberwolff.com/?cat=3
if you search by trades, regions, city or state it works. but on the results page you can not choose anything to filter again. Both my archive.php $ search.php are the same code.
Trevor Moderator(Private) January 10, 2019 at 1:12 pm #198593Are you able to give me a copy of the code for the search.php file?
Mike Stover(Private) January 10, 2019 at 9:36 pm #198623<?php get_header(); ?> <!-- Other Content here --> <div class="container text-left"> <?php if (isMobile() ) { echo '<div class="col-sm-3 sidenav"></div>'; } else { ?> <div class="col-sm-3 sidenav"><?php dynamic_sidebar('sidebar1');?></div><?php }; ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php $sid = get_the_ID(); $meta= get_post_meta($sid); $post_categories = wp_get_post_categories( $sid ); // get $phoneFormat = "(" . substr($meta['phone'][0], 0,3) . ") " . substr($meta['phone'][0], 3,3) . "-" . substr($meta['phone'][0], 6,4); if (in_category(3)){ ?> <div class="col-sm-7"> <h2><a href="<?php the_permalink() ?>"><?php echo $meta['name'][0] ; ?> </H2></a> <H4><?php echo $meta['city'][0] ;?>, <?php echo $meta['state'][0] ;?></h4> <h4><?php echo $meta['trade'][0] ; ?></h4> <p>Contact : <?php echo $meta['contact'][0] ; ?> | <?php echo $meta['email'][0] ; ?> <br> <?php echo $phoneFormat ; ?></p> </div> <div class="col-sm-2"> <?php $Qactive = $wpdb->get_results( "SELECT * FROM proj_stat WHERE active='1' AND status=0" ); //works echo '<div>'; echo '<hr>'; echo "Send Bid Invite<br><form action='". site_url()."/mail/invite.php' action='GET'>"; echo '<select name="p">'; echo '<option value="" disabled selected>Select Project</option>'; foreach ($Qactive as $job){ $pid = $job->pid; $pname = $job->name; $Qbid_chk = $wpdb->get_results( "SELECT * FROM bid_hist WHERE pid='$pid' AND sid='$sid'" ); //works if (empty($Qbid_chk)) { echo '<option value="'. $pid .'">'. $pname .'</option>'; } else { echo "<hr><h5>No Available Projects to Invite</h5><hr>"; } } echo '<input type="hidden" name="s" value="'. $sid .'">'; echo '<input type="hidden" name="t" value="'. $meta['trade'][0].'">'; echo '<input type="hidden" name="tid" value="'. $meta['tid'][0]. '">'; echo '<input type="hidden" name="e" value="1">'; echo '<input type="hidden" name="red" value="set"><button type="submit" class="btn btn-primary btn-sm">Send</button><hr>'; echo '</div>'; ?> </div> <?php } elseif (in_category(4)){ echo "hi"; } ?> <?php endwhile; else: ?> <p>There no posts to show</p> <?php endif; ?> </div> <h4> <center><?php echo paginate_links(); ?></h4></center> <br> <?php get_footer(); ?>
Mike Stover(Private) January 10, 2019 at 9:39 pm #198625the code is the same as the archive.php and it works fine from that page only. once it loads as a search it stops working
Trevor Moderator(Private) January 11, 2019 at 2:40 pm #198677This reply has been marked as private. -
AuthorPosts
You must be logged in to reply to this topic.