marksu2017
Forum Replies Created
-
Forum: Plugins
In reply to: [WPCasa - Real Estate for WordPress] Google Maps won’t show?Hi,
Theme is Elvira, and both the plugin and the theme seem updated to the latest version.
I’d ask you to do so. Please check on a working instance if there is both “_geolocation_[lat|long]” meta data in the database for a particular listing. In my instance, those were missing for all listings with an address set in the location box in post editing. I only have the
_map_geolocationmeta with a JSON containinglat,longandalt.I assume it’s not the widget code that misbehaves (see above) but the admin interface code that somehow misses putting these meta tags into the DB in the first place and only puts the JSON stuff in there.
In any case, the fix above does not harm current behaviour and extends protection against cases where lat/long is available via JSON only; perhaps put it in an upcoming release…
Cheers, Mark
Forum: Plugins
In reply to: [WPCasa - Real Estate for WordPress] Google Maps won’t show?Ok, I think I got it. The code for google maps seems to be outdated. Dirty fix:
- Create a child theme for now.
- Create a child plugin for now.
- Edit theme file ‘listing-location.php’ around line 45:
//$lat = get_post_meta( get_the_id(), '_geolocation_lat', true ); //$long = get_post_meta( get_the_id(), '_geolocation_long', true ); //if( $lat && $long ) { if( get_post_meta( get_the_id(), '_map_geolocation', true ) ) { - Edit plugin file ‘listing-single-location.php’ around top:
global $listing; $location_array = get_post_meta( $listing->ID, '_map_geolocation', true ); $lat = (get_post_meta( $listing->ID, '_geolocation_lat', true )?get_post_meta( $listing->ID, '_geolocation_lat', true ):$location_array["lat"]); $long = (get_post_meta( $listing->ID, '_geolocation_long', true )?get_post_meta( $listing->ID, '_geolocation_long', true ):$location_array["long"]);
- This reply was modified 9 years, 3 months ago by marksu2017.
Forum: Plugins
In reply to: [WPCasa - Real Estate for WordPress] Google Maps won’t show?small supplemental: Not even a container (“section”) element is generated for the map content.
After digging through github, I believe there is a snippet available:
<?php /** * Change details of the listing summary * * @param string $listing_summary * @param integer $post_id * @param array $details * @param bool $formatted */ add_filter( 'wpsight_get_listing_summary', 'wpsight_listing_summary_details', 10, 4 ); function wpsight_listing_summary_details( $listing_summary, $post_id, $details, $formatted ) { // Define set of details $details = array( 'details_1', 'details_2', 'details_4', 'details_5' ); // Create summary $listing_summary = wpsight_get_listing_details( $post_id, $details, $formatted ); return $listing_summary; }Also note that you probably need to set your custom detail’s “dashboard” attribute to “true” and give it a name under Dashboard => WPCasa => Settings.
In case someone needs an intermediate solution:
Edit the file
email-subscribers/classes/es-sendmail.phpand comment out the two lines$url = home_url('/'); $viewstatus = '<img src="'.$url.'?es=viewstatus&delvid=###DELVIID###" width="1" height="1" />';somewhere in the middle of the file. Unfortunately, you must do so after each update.
- This reply was modified 9 years, 4 months ago by marksu2017.
external cron
that wouldn’t do any good, since this would only trigger the local sending of mails. You still use wp_mail() for sending, even for cron jobs.
But I found something: there is a
sleep(60)inemail-subscribers/classes/es-sendmail.phpafter every 25 emails sent. This could definitely hinder sending mails when sending directly. I’ve commented that out, much better now.But still, AJAX sending with progress bar would be a nice option.
- This reply was modified 9 years, 4 months ago by marksu2017.
How many subscribers you have currently?
Erm, about that would be 47 active subscriptions. As I said, hosting is a bit slow. I don’t know how you compose the mail, but perhaps there’s a bottleneck there also. It used to work much faster when I only had like 20 subscribers.
With respect to prevent slow sending of emails, you should use Cron method and target Cron url to send emails only once a day.
I tried that, unfortunately to no avail. The cron system is equally slow. Moreover, it seems to not mark subscribers as already sent, when the connection closes mid-sending. Thus, some subscribers would receive the email twice.
Unfortunately, as this is a paid hosting, I cannot profile or switch on debugging or similar.