Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Ian Dunn

    (@iandunn)

    The plugin doesn’t have a UI for that, but you can modify which placemarks get pulled by using the bgmp_get-map-placemarks-query filter.

    Thread Starter Diana K. Cury

    (@dianakc)

    Hi,

    I tried the following but I get no markers at all ?? :

    function filter_items( $query )
    {
      if( is_page( 12 ) ) {
    
            $query[ 'tax_query' ] = array(
              array(
                'taxonomy'  => 'estado',
                'field'   => 'slug',
                'terms'   =>'em-funcionamento'
              )
            );
    
            $query[ 'tax_query' ] = array(
              array(
                'taxonomy'  => 'bgmp-category',
                'field'   => 'slug',
                'terms'   =>'saude',
                'operator' => 'AND'
              )
            );  
    
    }
    
    }
    add_filter( 'bgmp_get-placemarks-query', 'filter_items' );
    Plugin Author Ian Dunn

    (@iandunn)

    I think it defaults to doing an AND relation, meaning that it’s only looking for posts that have both terms assigned, so you’d need to explicitly make it an OR relation, if that’s what you’re looking for.

    Thread Starter Diana K. Cury

    (@dianakc)

    I tried everything but then the markers disapears ??

    Thread Starter Diana K. Cury

    (@dianakc)

    I think there is something wrong with bgmp_get-map-placemarks-query, can’t even test it out with if(is_page()), the markers disappear all over the pages.

    Plugin Author Ian Dunn

    (@iandunn)

    is_page() won’t work because the the filter runs in the context of The Loop, see https://codex.www.ads-software.com/is_page

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Display markers from both taxonomies’ is closed to new replies.