GEO my WP Support

Use this forum for technical support and general questions related to GEO my WP plugin and its core add-ons only. For technical support and general questions related to any of the premium extensions please open a new premium support ticket.

[Resolved]Set 'term_id' in map generated by auto location

Home Forums Support Set 'term_id' in map generated by auto location

This topic contains 3 replies, has 2 voices, and was last updated by  ivollaire 2 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #55281

    ivollaire
    Participant

    Hello! Thanks for the great plugin. It’s been exactly what we’ve needed up until one stumbling block we’ve found recently. We want to generate a map when a user first hits a page that only contains results from a certain term_id. In this case it’s specific categories. These pages will be the index page for the category so we only want the results from that category to show in the map and results.

    I saw a similar question and used the code provided but it still isn’t working. For reference this is the code we’ve put in functions.php

    The shortcode being used is:

    Eventually we’d also like to use:

    Am I doing something wrong? Or maybe this is functionality that is added in a premium extension? Any help would be great.

    Thanks!

    #55297

    Eyal Fitoussi
    Keymaster

    Hello ivollaire,
    The code you are referring to is meant to work with the Global Maps add-ons.

    You can do something similar, but using a different filter and it will require a custom functions to be added as well.

    The filter you can use is gmw_pt_search_query_args and can be found in geo-my-wp/plugins/posts/includes/gmw-pt-search-query-class.

    when using a custom function with this filter, the form object will pass to the function and the term_id value ( which you will pass via the shortcode ) can be retrieved using $gmw[‘params’][‘term_id’].

    In short, try the script below ( change ‘category’ to your taxonomy ):

    Let me know if that helps.

    #55338

    Eyal Fitoussi
    Keymaster

    This topic marked “Resolved” due to inactivity. If you wish to reply to this topic please change its status to “Not resolved”  before replying.

    #55370

    ivollaire
    Participant

    Thanks for the response. The paid extension “Premium Settings” actually added the options I needed. I was able to generate separate forms for each term ID that work well enough for what we need.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.