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.

[Not resolved]Show only one category

Home Forums Support Show only one category

This topic contains 1 reply, has 2 voices, and was last updated by  Eyal Fitoussi 1 month, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #59619

    iba
    Participant

    Hi, I have tried to show only one category like explained here:
    https://geomywp.com/forums/topic/set-category-in-shortcode/

    but I don’t get is to work.

    This is teh shortcode:
    [gmw form=”3″ term_id=”24″]

    I use this in my functions.php:
    function gmw_gmap_set_default_taxonomy( $gmw ) {

    // abort if term_id is not set
    if ( empty( $gmw[‘params’][‘term_id’] ) )
    return $gmw;

    $gmw[‘page_load_results’][‘taxonomies’][‘usage’] = ‘include’;
    $gmw[‘page_load_results’][‘taxonomies’][‘tt_id’] = array( $gmw[‘params’][‘term_id’] );

    return $gmw;

    }
    // change the value 3 to your form ID
    add_filter( ‘gmw_default_form_values_3’, ‘gmw_gmap_set_default_taxonomy’ );

    #59675

    Eyal Fitoussi
    Keymaster

    Hello iba,

    The script you mentioned is meant to work with the Premium Settings extension which allows your to include/exclude categories via the form editor.

    The script won’t work with GEO my WP core plugin alone.

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

You must be logged in to reply to this topic.