Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › GEO my WP location in single product page ?
- This topic has 5 replies, 2 voices, and was last updated 6 years, 5 months ago by WCFM Forum.
- AuthorPosts
- July 20, 2018 at 7:17 pm #26673d-n-13Participant
Hello
I’ve been testing this : https://wclovers.com/knowledgebase/wcfm-geo-wp/
Isn’t it support to show in Single Product Page ? it doesn’t show for me.
Also which better, GEO my WP or MapPress ?
Thanks
- July 22, 2018 at 7:23 am #26703WCFM ForumMember
Hi,
Off course, GEO my WP is better for such purpose.
Kindly add this code to show product location in single product page –
function wcfm_show_product_location() { global $product; if( $product && is_object( $product ) ) { echo do_shortcode( '[gmw_single_location elements="distance,map,address,live_directions,directions_panel" map_width="100%"]' ); } } add_action( 'woocommerce_single_product_summary', 'wcfm_show_product_location', 20 );
Thank You
- July 22, 2018 at 8:05 am #26714d-n-13Participant
it is not working (check screenshot)
And i want it to show in product tabs below if possible
- July 22, 2018 at 8:19 am #26721WCFM ForumMember
Hi,
I think, you didn’t enable required Geo my WP addon for this.
Please be sure you have enabled – Posts Locator and Single Location add-ons (both are free).
Also enable Post Locator for “Product” post type.Well, for showing this as tab use this code –
function wcfm_location_show() { global $product; if( $product && is_object( $product ) ) { echo do_shortcode( '[gmw_single_location elements="distance,map,address,live_directions,directions_panel" map_width="100%"]' ); } } function wcfm_location_product_tab( $tabs ) { global $WCFM, $product; if( $product ) { $tabs['wcfm_location_tab'] = array( 'title' => 'Location', 'priority' => apply_filters( 'wcfm_location_tab_priority', 98 ), 'callback' => 'wcfm_location_show' ); } return $tabs; } add_filter( 'woocommerce_product_tabs', 'wcfm_location_product_tab', 98 );
Thank You
- July 22, 2018 at 8:56 am #26735d-n-13Participant
I activated Single Location and it worked.
Thank You Sir!
- July 22, 2018 at 8:58 am #26736WCFM ForumMember
Great 🙂
- AuthorPosts
- The topic ‘GEO my WP location in single product page ?’ is closed to new replies.