melon503
Forum Replies Created
-
Forum: Plugins
In reply to: [WP-Filebase Download Manager] No integrated search with wordpressGreetings Fabian –
I’m trying to access the wpdb_filepage custom post type and expose the terms via a function similar to the native WP function get_taxonomies – is there an equivalent (or approximation) that you have developed for wp-filebase? I’m trying to integrate wp-filebase with Ajax Search Pro, and in order to get custom field results to show in a way that is understandable to the front end user, it is necessary to create or access such a function.
Thank you
Forum: Plugins
In reply to: [Yoast SEO] title, meta tags not showingp.s. WordPress SEO version is Version 1.3.4.1 and WP version is 3.5
Forum: Plugins
In reply to: [Yoast SEO] title, meta tags not showingAnyone?
Hey All,
I’m not claiming that this is a clean way to do this, but basically I used the existing postcode field and then added the following to line 231 of em-events.php :
// this filter adds the logic to the SQL query to take the postcode and compare it to the lat / lng of the location. add_filter( 'em_events_build_sql_conditions', 'my_em_scope_conditions',1,2); function my_em_scope_conditions($conditions, $args){ if( !empty($args['postcode']) ){ $base_url = "https://maps.google.com/maps/geo?output=xml&key=[your google key here]"; $request_url = $base_url . "&q=" . urlencode($args['postcode']); $xml = simplexml_load_file($request_url); $status = $xml->Response->Status->code; if (strcmp($status, "200") == 0) { // Successful geocode $geocode_pending = false; $coordinates = $xml->Response->Placemark->Point->coordinates; $coordinatesSplit = split(",", $coordinates); // Format: Longitude, Latitude, Altitude $lat = $coordinatesSplit[1]; $lng = $coordinatesSplit[0]; $radius=$input_radius; } $conditions['scope'] = " (3956 * 2 * ASIN(SQRT(POWER(SIN(('".$lat."' - abs(location_latitude))*pi()/180/2),2) + COS('".$lat."' * pi()/180) * COS(abs(location_latitude) * pi()/180) * POWER(SIN(('".$lng."' - location_longitude) * pi()/180/2),2))) < '".$radius."')"; } return $conditions; }
[Moderator Note: Please post code or markup snippets between backticks or use the code button.]
Very helpful agelonwl – thanks a ton for taking the time to post this.