[NSFW] Search description store
-
Hi, I would like to create a search by store description, do you know how to do it? I attach what I did:
function cercahome_shortcode() { global $wpdb; $store_categories = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}wcfm_store_categories" ); $strg='<div class="" data-element_type="" data-widget_type="t"> <div class=""> <form class="" action="/i-nostri-partner/" method="GET" style="--wd-gap-lg:10px;"> <input type="text" name="wcfmmp_store_search" placeholder="Cerca azienda" /> <input type="text" name="wcfmmp_store_city" placeholder="Cittá" /> <select name="wcfmsc_store_categories"> <option ></option>'; foreach($store_categories as $store_categorie){ $name=$store_categorie->name; $valeu=$store_categorie->ID; $strg.='<option value="'.$valeu.'">'.$name.'</option>'; } $strg.='</select><div class=""> <button type="submit">Filtro</button> </div> </form> </div> </div>'; return $strg; } add_shortcode('cercahome', 'cercahome_shortcode');
- The topic ‘[NSFW] Search description store’ is closed to new replies.