Generating a radius search on postmeta-metavalue and adding a taxonomy to query

Well, they say perseverance is the key… Having found a link in the RELATED questions.. https://stackoverflow.com/questions/17588525/how-to-join-post-meta-and-taxonomy-table-wpdb-mysql, I got the answer. Ok, its not using Native parameters as suggested, nor does it give excessive load times as thought (its only displaying 5 properties max in a sidebar widget). Not Everyone who asks a question here is … Read more

Allow user to select location and then set cookie for location in WordPress

This code will set a cookie that essentially doesn’t expire. Adjust the time value to make it expire sooner: $cookiename = “ChocalateChip”; $cookievalue = “This is a tasty cookie value”; setcookie($cookienme, json_encode($cookievalue), time() + (86400 * 30*365*6), “https://wordpress.stackexchange.com/”);

Searching post types

The quick and simple method might be to create a custom page template and have the search form send the user to the page that you create with it. <?php /* Template Name: Location Results */ if ( isset($_REQUEST[‘search_field_name’]) && !empty($_REQUEST[‘search_field_name’]) ) { # Read and escape the input data # Do your query, grab … Read more

Maps search box autocomplete with callback JS function?

Try this in your js file: function robbte_map_initialize() { var input = document.getElementById(‘searchTextField’); var autocomplete = new google.maps.places.Autocomplete(input); google.maps.event.addListener(autocomplete, ‘place_changed’, function () { var place = autocomplete.getPlace(); if (!place.geometry) { window.alert(“Select a suggestion from the list”); return; } document.getElementById(‘city2’).value = place.name; document.getElementById(‘cityLat’).value = place.geometry.location.lat(); document.getElementById(‘cityLng’).value = place.geometry.location.lng(); }); } jQuery(document).ready (robbte_map_initialize);