The website I am working on can list restaurants and we can rate them. Currently, I'm developing a multi criteria search to find the good one.
I created a custom HTML form with XYZ Html (plugin) and I added the snippets to a page:
I put the following code in the functions.php
file (wp-content/themes/auberge) to intercept the submit:
function recherche_multi_critere() {
if ( $_POST['nom'] != NULL ) {
// ...
}
}
add_action( 'template_redirect', 'recherche_multi_critere' );
But when I'm here, I don't know how to create a custom page with the data. For example, I want to list all the restaurants that match the search as links. What can I do ?
- WP Version : 4.3.1
- PHP/MySQL Version : 5.5.12/5.6.17
- Theme : Auberge
- Extensions : bbpress, Beaver Builder Plugin (Lite Version), Clean and Simple Contact Form, Display Posts Shortcode, Header and Footer, Insert HTML Snippet, Insert PHP, Jetpack par WordPress.com, Livre d'or Gwolle (Gwolle GuestBook), PHP Code for posts, Post Meta Inspector, Ultimate Member, WordPress Reviews, WordPress Reviews Submit, WP Google Maps