GEO my WP location in single product page ?

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Ultimate GEO my WP location in single product page ?

Viewing 5 reply threads
  • Author
    Posts
    • #26673
      d-n-13
      Participant

      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

    • #26703
      WCFM Forum
      Member

      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

    • #26714
      d-n-13
      Participant

      it is not working (check screenshot)

      And i want it to show in product tabs below if possible

    • #26721
      WCFM Forum
      Member

      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

    • #26735
      d-n-13
      Participant

      I activated Single Location and it worked.

      Thank You Sir!

    • #26736
      WCFM Forum
      Member

      Great 🙂

Viewing 5 reply threads
  • The topic ‘GEO my WP location in single product page ?’ is closed to new replies.