WPPizza – A Restaurant Plugin for WordPress › Support › General Support › FIlter based search help needed…
- AuthorPosts
- 22 October, 2015 at 5:43 pm #13368
Hello @ all …
I want to create a filter based search in combination with the wp-pizza plugin and “so far so good” .. but right now i neede some help:
This is the code for the output, but instead of “outputting” the permalink I want the wp-pizza “results”, like all over the page (I hope you understand what i mean)… not just a link to a single item. Any help i appreciated 🙂 Thx so much!And this is the code so far:
add_filter('uwpqsf_result_tempt', 'customize_output', '', 4); function customize_output($results , $arg, $id, $getdata ){ // The Query $apiclass = new uwpqsfprocess(); $query = new WP_Query( $arg ); ob_start(); $result = ''; // The Loop if ( $query->have_posts() ) { while ( $query->have_posts() ) { $query->the_post();global $post; echo '<li>'.get_permalink().'</li>'; } echo $apiclass->ajax_pagination($arg['paged'],$query->max_num_pages, 4, $id, $getdata); } else { echo 'no post found'; } //here you can add the back button/link echo '<a href="http://url_to_back">New Search</a>'; /* Restore original Post Data */ wp_reset_postdata(); $results = ob_get_clean(); return $results; }
22 October, 2015 at 6:38 pm #13369like all over the page (I hope you understand what i mean)
no, sorry, i do not know what you mean
i could guess but that’s not helpful and might only serve to confuse the issue22 October, 2015 at 10:18 pm #13378This reply has been marked as private.22 October, 2015 at 10:27 pm #13379i guessed that’s what you might be referring to.
i would suggest you look at the wppizza-wrapper.php
read the comments in there - AuthorPosts
- The topic ‘FIlter based search help needed…’ is closed to new replies.