Forum Replies Created
-
AuthorPosts
-
Matteo
ParticipantHI, thanks for your answer. You understud correctly, I guess your way is correct, and will solve my problem. Thanks a lot
Matteo
ParticipantHi, still me, to be more clear each event has a different ID (post_id) and the same Name (post_title) and i need to get all the Cities (_VenueCity) for all the events with same name (post_title).
I can’t figure out how to hook the events in the post table with the venue in the postmeta.
Is it possible? Can you help?
Thanks again, best regards.Matteo
ParticipantHi, thanks for quick reply 🙂
I tried that piece of code in the theme-child (Enfold) function.php, but i get an empty serch bar…
Is this line correct?foreach ( $filters as &$individual_filter )There’s an ampersand just before the$individual_filtervariable. I tried with&and wothout&with the same result.
Anyway i can build a select with my custom values as you can see here:
http://www.siamocreativi.it/palketto/eventi/
(the original#tribe-bar-geolocis hidden and updated via jQuery)
what i can’t do is to is to populate my select options querying the database:
e.g.:function selezionaSpettacolo() { $dbconn = new mysqli ('localhost','name','password','database'); if (!$spettacolo = $dbconn->query("SELECT post_title FROM plkt_posts WHERE post_type = 'tribe_events' GROUP BY post_title")) { exit('<p>Errore nella lettura del database</<p>'); } while ($row = $spettacolo->fetch_assoc()) { $nomespettacolo = htmlspecialchars($row['post_title']); echo "<option value=''>$nomespettacolo</option>\n"; } } ......... $filters['tribe-bar-geoloc'] = array( 'name' => 'tribe-bar-geoloc', 'caption' => __( 'Near', 'tribe-events-calendar-pro' ), 'html' => '<input type="hidden" name="tribe-bar-geoloc-lat" id="tribe-bar-geoloc-lat" value="' . esc_attr( $lat ) . '" /><input type="hidden" name="tribe-bar-geoloc-lng" id="tribe-bar-geoloc-lng" value="' . esc_attr( $lng ) . '" /><input type="hidden" class="luogo" name="tribe-bar-geoloc" id="tribe-bar-geoloc" value="" placeholder="' . __( 'Location', 'tribe-events-calendar-pro' ) . '"><select id="myselect">' . selezionaSpettacolo() . '</select>'');If I try this way(i guess i need a more secure way to connect to db…), the options filds are displayed outside the select, inside the
#tribe-events-content-wrapperlike:<div class="tribe-clearfix" id="tribe-events-content-wrapper"><input type="hidden" value="" id="tribe-events-list-hash"> <!-- Tribe Bar --> <option value="">AN IDEAL HUSBAND</option> <option value="">Cicoria</option> <option value="">EL PERRO DEL HORTELANO</option> <option value="">FAME Jr: the musical</option> <option value="">LE COMTE DE MONTECRISTO</option> <option value="">LE PETIT PRINCE</option> <option value="">SHREK</option> <div id="tribe-events-bar">Sorry 🙂 Php is not one of my must (I’m better with Html and jQuery).
Thanks a lot for your time.
Best regards. -
AuthorPosts
