Forum: Global Maps

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support related to the Global Maps premium extension please open a new premium support ticket.

[Resolved]set category in shortcode

Forums Global Maps set category in shortcode

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
  • #48278


    Thanks for the great plugin. I was wondering, is it possible to filter by category in a form shortcode directly?

    Thank you,



    You are welcome Tony, Thank you for the purchase.

    I was wondering, is it possible to filter by category in a form shortcode directly?

    I am not sure I understand, can you please explain what is that you would like to do?

    Thank you.


    Hi Eyal,

    Actually I’m using a global map form by shortcode like that :

    [gmw form="1"]

    And I wanted to know if there was a way of specifying a taxonomy term in the shortcode. For example :

    [gmw form="1" include_terms="tourism"]

    I tried to search for an answer in the docs but couldn’t find anything for that.

    Thanks for your help.


    Unfortunately, it is not possible at the moment.

    Since the beginning, I developed GEO my WP forms builder to prevent the need to enter a bunch of shortcode attributes in order to set up a shortcode.

    Is there a reason why you would like to enter the terms this way instead of setting them up directly in the form?


    Hi Eyal,

    Thanks for your response.

    The thing is that I have a lot of different categories (50+) and I wanted to generate the maps on each page instead of having to create all of them manually. Is that possible in some way?

    Thank you for your support.


    Any news?


    Sorry for missing out your last reply.

    There is actually a way to do that.

    You can set the term ID that you would like to display for the shortcode using a term_id attribute ( or any other attribute that you’d like to use ). For example [gmw form=”3″ term_id=”12″] ( showing only posts with term ID 12 for form ID 3.

    Then place the below script in the functions.php file of your theme or child theme:

    The script will filter the map results based on the term_id you pass to the shortcode.

    Let me know if that helps.


    Just checking if you got to try the solution above and if it worked.


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


    Hi, Eyal. I’m trying to do the same thing as is mentioned in this thread. I want to have a page that will show a user only results from a certain category when a page loads using the auto-locator functionality. I have this code in my functions file:

    The shortcode I’m using is:

    do_shortcode('[gmw form="1" term_id="65"]');

    Where ‘term_id’ is the category that I want displayed. This doesn’t work. Am I doing something wrong? Any help would be great.

    This reply has been marked as private.
    Serge Ravet

    Hi, I’ve added the function in functions.php, changed ‘3’ to ‘1’ (my first form). Then in a page I’ve added:

    [gmw form=”1″ term_id=”41″]
    [gmw map=”1″]

    Yet nothing is filtered based on the taxonomy ID… Any idea what the problem could be?


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

The topic ‘set category in shortcode’ is closed to new replies.