multiple mashups

Home Forums MapPress Support multiple mashups

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13157
    sirena
    Participant

    I currently have one Australia-wide map.
    http://bellydanceoz.com/find-a-teacher-by-suburb/
    It’s too hard to navigate so i want to split it up by capital city, and I’m having trouble because I can’t get the queries to work.

    The categories I have are Sydney, Brisbane, Adelaide, Melbourne etc. I’ve tried using the shortcodes from the documentation but they don’t. I notice that when I try testing the queries as suggested, I can’t get them to work either, so I assume that’s the problem. Any ideas?

    #13162
    Chris
    Keymaster

    It would help if you posted the query or queries that don’t work for you so I can see if there’s a formatting error.

    #13166
    sirena
    Participant

    The test query I used was:

    http://bellydanceoz.com/?category_nsw

    I tried using this for the mashup:

    [mashup query="posts_per_page=-1&category_name=nsw"]

    I also tried this:
    [mashup query="posts_per_page=-1&category=7"]

    #13173
    Chris
    Keymaster

    Hi,

    The first example should be using the category slug, so just double check you have a slug “nsw”.

    In the second, “category” isn’t valid, you need to use “cat”:
    [mashup query=”posts_per_Page=-1&cat=7″]

    See here for some examples:
    http://codex.wordpress.org/Class_Reference/WP_Query

    You can also put a little code in your theme to see what WordPress would output for a query – without using a map:

    <?php
      $query = new WP_Query( 'cat=7' );
      print_r($query->posts);
    ?>
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.