Show all POI from one page and a custom post type

Home Forums MapPress Support Show all POI from one page and a custom post type

This topic contains 3 replies, has 2 voices, and was last updated by  Chris 3 days, 13 hours ago.

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


    I have a custom post type “bars” and I have one page with 5 hotels. Is it possible to show in a mash up all the bars in the category and the 5 hotels from the page?

    I tried this [mashup query="post_type=bars" query="post__in=19" width="100%" height="600"]

    But it only shows the second query? Can they be combined? If so what is the code?



    There’s no way to pass ‘OR’ queries like this through the shortcode.

    However, you could assign all the relevant posts to categories rather than using post type (e.g., category ‘bars’ and ‘hotels’), then query by all the necessary categories (you can separate categories by commas).

    Or, group them under a specific separate taxonomy just for the purpose of combining them, such as a ‘map1’ tag.

    There are some example queries here:



    I changed the hotel page to a post and assigned it a category hotel.
    I then created the mash-up

    [mashup query="category__and=bar,hotel&posts_per_page=-1" width="100%" height="600"]

    But it is showing all of the actual categories, not just the two I specify? Have I made an error in the shortcode?



    Hi, that query only finds posts with both categories. I think you want posts in either category, which would be:


    There are some additional examples in the documentation:

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

You must be logged in to reply to this topic.