Kiran
Forum Replies Created
-
AuthorPosts
-
Hello Kai,
You can restrict showing packages from user in package list dropdown by using following code snippet.
/* Restrict package during upgrade */ function _gd_custom_restrict_upgrade_package_query( $sql ) { global $post, $wpdb; if ( empty( $_REQUEST['pid'] ) || empty( $_REQUEST['package_id'] ) ) { return $sql; } if ( is_admin() || ! ( ! empty( $post ) && $post->ID == $_REQUEST['pid'] ) ) { return $sql; } if ( ! geodir_is_page( 'add-listing' ) ) { return $sql; } $package_id = geodir_get_post_meta( absint( $_REQUEST['pid'] ), 'package_id', true ); $restrict_packages = array(); // DO STUFF HERE if ( $package_id == 12 ) { $restrict_packages = array( 1, 2, 3, 4 ); } /* // Example if ( $package_id == 21 ) { $restrict_packages = array( 1, 2, 3, 4, 12 ); } if ( $package_id == 2 ) { $restrict_packages = array( 1 ); } */ if ( ! empty( $restrict_packages ) ) { $sql = str_replace( "where status=1 and post_type =", "WHERE status = 1 AND pid NOT IN( '" . implode( "','", $restrict_packages ) . "' ) AND post_type =", $sql ); } return $sql; } add_filter( 'geodir_package_list_query', '_gd_custom_restrict_upgrade_package_query', 10, 2 );Add above snippet in your child theme functions.php or execute via any PHP snippet plugin.
For example i have used to hide packages 1, 2, 3, 4 from user if current listing being upgrade has package id 12.
Change that lines with your package id.Thanks,
KiranHello Ansen,
Issue has been fixed.
I have done:
– Diactivate > Activate the GeoDirectory & Location Manager plugins
– Run tool from “GeoDirectory > Status > Tools > Clear version numbers”Please check and let us know.
Thanks,
KiranThis reply has been marked as private.This reply has been marked as private.Hello Shahram,
After doing some debugging found that there is conflict with “WP-Persian” plugin. WP-Persian plugin have options that translate date numbers into non-english language. Ex it translates post date to ۱۳۹۷-۰۵-۲۳ ۱۴:۰۹:۳۵, and during post insert/update it raises error. That’s why it refuses to import post.
You can fix this by one of following:
1) Remove post_date column from csv
2) Disable date number translation from WP-Persian
2) Add following code snippet in your child theme functions.php or execute via any PHP snippet plugin.function _gd_custom_fix_wpp_conflict() { if ( class_exists( 'WPP_Hooks' ) && ! empty( $_REQUEST['task'] ) && $_REQUEST['task'] == 'import_post' && ! empty( $_REQUEST['action'] ) && $_REQUEST['action'] == 'geodir_import_export' ) { remove_filter( 'date_i18n', array( 'WPP_Hooks', 'wpp_date_i18n' ) ); } } add_action( 'admin_init', '_gd_custom_fix_wpp_conflict', 10 );Kiran
Hello,
Did you updated(saved) listing before listing update?
Please check this https://wpgeodirectory.com/support/topic/paid-plan-downgradeexpiry-to-free-not-losing-data/#post-355789
Let us know.
Kiran
This reply has been marked as private.Hello Alex Howes,
If listing renewed under same package then it should add remaining days to new expire date. Ex: if you renew the listing before 10 days of expire date then it will set a new expire date by adding 40 days (10 + 30 ) to today.
Please send us admin credentials if it not doing so.
Kiran
Hello,
It still not showing any files/directory (see attachment). You have to give access to root WordPress to FTP account testgd. This is managed from CPanel > FTP Accounts.
Kiran
Hello Gui,
You can use $numposts = $wp_query->found_posts; to retrieve posts count.
Usage:
global $wp_query; $numposts = $wp_query->found_posts;You can get help from current pagination function https://wpgeodirectory.com/codex/codex/geodirectory_functions/geodir_pagination/
Kiran
Hello Shahram,
The FTP account you provided has no wordpress directory access. It not showing any files/directory after connecting via FTP client. Please give root directory access to that account.
I have tested same csv file you attached with import/export/re-import in my test site and it imported without any issue.
Let us know.
Thanks,
KiranHello Benjamin,
Try following code snippet to get country tab by default selected.
/* Location switcher default tab */ function _gd_custom_location_switcher_default_tab( $default_tab ) { $default_tab = 'country'; // country, region, city, neighbourhood (if active) return $default_tab; } add_filter( 'geodir_location_switcher_default_tab', '_gd_custom_location_switcher_default_tab', 10, 1 );Kiran
This reply has been marked as private.August 24, 2018 at 1:14 pm in reply to: apostrophe in French with the Search engin tool (in result page) #443859Hello,
We have reversed our previous changes, so now you can search with both special apostrophe or normal apostrophe.
It will be in next release. You can update patch from here https://github.com/GeoDirectory/geodirectory/pull/472/commits/e08f14209a31695504faf3e48902ab0ed208318aKiran
Hello,
Is there some way of forcing the coordinates of the map to display?
No, currently it is not possible.
Also on another note, no description content shows up in the pop-up map listing.
How do I get this to show?Try following code snippet to display description on map popup.
function _gd_custom_desc_on_popup( $post_object, $preview = false ) { $post = get_post( $post_object->ID ); $desc = geodir_utf8_substr( strip_tags( $post->post_content ), 0, 140 ); if ( $desc ) { echo '<div class="geodir_more_info geodir_content" style="clear:both;"><span class="geodir-i-contact" style="">' . __( 'Desc:', 'geodirectory' ) . ' </span>' . geodir_utf8_substr( strip_tags( $post->post_content ), 0, 140 ) . '</div>'; } } add_action( 'geodir_infowindow_meta_after', '_gd_custom_desc_on_popup', 10, 2 );Kiran
-
AuthorPosts