Giri
Forum Replies Created
-
AuthorPosts
-
If you want you can add that line by yourself
File: wp-content/plugins/geodir_event_manager/gdevents_template_functions.php
Somewhere around line number 988 you will see the following code
if( isset( $package_info->link_business_pkg ) && $package_info->link_business_pkg == '1' ) {
You need to add the following line ABOVE that code.
$geodir_link_business = apply_filters('geodir_link_business_id', $geodir_link_business, $package_info->post_type);
Let me know if you have problem.
Thanks
The following code assumes every user has only one gd_place listing.
When they go to add event page that 1 gd_place should be automatically filled.
Add this code in your child theme functions.php file
function gdevent_geodir_link_business_id($id, $post_type) { if (geodir_is_page('add-listing') && $post_type == 'gd_event' && !isset( $_REQUEST['pid'] )) { if (!is_user_logged_in()) { return $id; } $query_args = array( 'posts_per_page' => 1, 'is_geodir_loop' => true, 'post_type' => 'gd_place' ); add_filter('geodir_filter_widget_listings_where', 'gdevent_get_user_link_biz_id', 1); $widget_listings = geodir_get_widget_listings($query_args); remove_filter('geodir_filter_widget_listings_where', 'gdevent_get_user_link_biz_id', 1); if (!empty($widget_listings)) { foreach ($widget_listings as $post) { $id = $post->ID; } } } return $id; } add_filter('geodir_link_business_id', 'gdevent_geodir_link_business_id', 10, 2); function gdevent_get_user_link_biz_id($where) { global $wpdb; $user_id = get_current_user_id(); $where .= " AND $wpdb->posts.post_author = $user_id "; return $where; } function gdevent_geodir_link_business_add_js() { global $post; $package_info = array(); $package_info = geodir_post_package_info( $package_info , $post ); if (geodir_is_page('add-listing') && $package_info->post_type == 'gd_event' && !isset( $_REQUEST['pid'] )) { ?> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery('#geodir_link_business_autofill').click(); }); </script> <?php } } add_action('wp_footer', 'gdevent_geodir_link_business_add_js');
You also need to add one line in event manager plugin to make the above code work.
You can post you wp admin login details. I’ll add that line in your website.
Thanks
Also: In buddypress profile header, there is “VENDOR” and “VISIT VENDOR” I have not found where to translate these, unless i do hardcoding – and then everything is gone in an update.
I don’t see any text like “VENDOR” or “VISIT VENDOR” in buddypress profiles. could you give me the direct link or screenshot?
Thanks
This reply has been marked as private.Ibrahima, Sorry. Paolo was travelling somewhere and took the day off yesterday. So let me help you.
Could you give me the page link where you have those issues?
Thanks
Glad you made it work without our help.
Just to help other users, here is the link.
https://wpgeodirectory.com/docs/whoop-theme-available-widgets/#ayi-widget
Hi there, It requires some tweaks.
You need to change this line
to
echo apply_filters('gd_special_offers_content', wpautop(stripslashes($special_offers)));
and then you need to add this line in child theme functions.php file
add_filter('gd_special_offers_content', 'do_shortcode');
You can either post your wp admin details here or wait till GD next version release.
Thanks
Hope this works for you
function gd_add_my_listings_sc($atts) { $defaults = array( 'stype' => 'gd_place', ); $params = shortcode_atts($defaults, $atts); if (is_user_logged_in()) { global $current_user; $author_link = get_author_posts_url($current_user->data->ID); $author_link = geodir_getlink($author_link, array('geodir_dashbord' => 'true'), false); $listing_link = geodir_getlink($author_link, array('stype' => $params['stype']), false); $listing_link = apply_filters('geodir_dashboard_link_my_listing', $listing_link, $params['stype'], $current_user->ID); return '<a href="'.$listing_link.'">My Listings</a>'; } return ""; } add_shortcode('gd_my_listings_link', 'gd_add_my_listings_sc' );
Hello Sara, As far as I know we don’t have any existing shortcode to display my listing link.
But don’t worry. I have created one for you. just place this in your child theme and then use this shortcode in your editor.
[gd_my_listings_link]
function gd_add_my_listings_sc($atts) { $defaults = array( 'stype' => 'gd_place', ); $params = shortcode_atts($defaults, $atts); if (is_user_logged_in()) { global $current_user; $author_link = get_author_posts_url($current_user->data->ID); $author_link = geodir_getlink($author_link, array('geodir_dashbord' => 'true'), false); $listing_link = geodir_getlink($author_link, array('stype' => $params['stype']), false); $listing_link = apply_filters('geodir_dashboard_link_my_listing', $listing_link, $params['stype'], $current_user->ID); return $listing_link; } return ""; } add_shortcode('gd_my_listings_link', 'gd_add_my_listings_sc' );
Let me know how that goes.
You are welcome 🙂
Icons are inside the span text. So you can either display both icon and label or hide both.
This is the code i used in GeoDirectory > Design > Scripts > Custom style css code
Remove it if you want to display them
.geodir-sidebar-wrap .geodir-i-location, .geodir-sidebar-wrap .geodir-i-contact { display:none; }
Done
Here is the modified code
function gd_strip_link_from_biz_logo($html) { global $post; //$html = preg_replace('/<a href="(.*?)">(.*?)</a>/', "\1", $html); $html = '<img src="'.$post->geodir_gd_bus_logo.'" class="gd_bus_logo_img" alt="" />'; return $html; } add_filter('geodir_show_geodir_gd_bus_logo', 'gd_strip_link_from_biz_logo');
I have added this code in your child theme functions.php file. Your logo doesn’t have link now.
function gd_strip_link_from_biz_logo($html) { $html = preg_replace('/<a href="(.*?)">(.*?)</a>/', "\2", $html); return $html; } add_filter('geodir_show_geodir_gd_bus_logo', 'gd_strip_link_from_biz_logo');
No the problem is from Event manager. So this fix will be included in next version of event manager.
Thanks
Hi there I have fixed time issue, it was a bug and I have applied patch on your stage site.
As for your duplicate events problem,
I’m guessing you have used yearly recurring events when you create “Road Cycling Holidays Costa Blanca” event. Event manager usually shows duplicate event if its a recurring one.
You might have disabled recurring feature after creating that event. So if you don’t want that duplicate event try to delete “Road Cycling Holidays Costa Blanca” event and create it once again.
Thanks
-
AuthorPosts