Chris

Forum Replies Created

Viewing 15 posts - 721 through 735 (of 1,120 total)
  • Author
    Posts
  • in reply to: Custom Post Type Mashups (using toolset plugin) #12662
    Chris
    Keymaster

      Also – for the current posts, try:

      [mashup query="current"]

      This will depend on your theme, plugins, etc. though – it will only work if the current global WordPress query ($wp_query) is set to the correct posts.

      in reply to: Custom Post Type Mashups (using toolset plugin) #12660
      Chris
      Keymaster

        Hi,

        By default WP will only select post type ‘post’. You might try including the post type in your query:

        [mashup query="post_type=location&posts_per_page=-1"]

        Or just all post types:

        [mashup query="post_type=any&posts_per_page=-1"]

        in reply to: To Display Map In Side Bar #12641
        Chris
        Keymaster

          Hi,

          You can pass arguments as an array:

          echo $maps[0]->display(array('width' => '50%', 'height: 300px'));

          in reply to: To Display Map In Side Bar #12637
          Chris
          Keymaster

            Hi,

            I’m not sure I understood. If you just want to display the map for the current post, the widget has a ‘current post’ option, or you can use query=”current” in the [mashup] shortcode.

            If you want to use PHP, you can get all the maps for a particular post using Mappress_Map::get_post_map_list($postid).

            For example this should display the first map for the current post:

            <?php
              global $post;
              $maps = Mappress_Map::get_post_map_list($post->ID);
              if (isset($maps[0]))
                echo $maps[0]->display();
            ?>
            in reply to: Switching to different POIs on map from article #12631
            Chris
            Keymaster

              Hi,

              If it is a mashup you’re displaying, you can use getPoiById() instead, and pass it the post ID you want (1234 in this example):

              mapp0.getPoiById(1234).open(true);

              If you’re displaying a map, the POIs are numbered in the order they appear on the map: 0, 1, 2…and so on.

              Chris
              Keymaster

                Hi Clive,

                You can modify the map_poi.php template to always display the post title instead of the POI title. From your other question, it sounds like you’ve already started playing around with the template but if you need help let me know. If you can, send an email with your current template so I can take a look (chrisvrichardson at mappresspro.com).

                in reply to: feature image instead of pin #12626
                Chris
                Keymaster

                  Hi,

                  1 – no (you could convert all the images to custom icons but it would be very time-consuming)

                  2 – [mappress width="100%" height="100%"]. Note that if you set a % height your page body must also have a height. Most blog pages don’t (since they can be scrolled up and down). You can test it by just putting a div in your theme:

                  <div style="background-color: red; width: 100%; height: 100%"></div>

                  in reply to: Switching to different POIs on map from article #12625
                  Chris
                  Keymaster

                    Hi Robert,

                    There’s a function called get_open_link() in ‘mappress_poi.php’ that does something similar.

                    You can take a look at that code, or try adding javascript like this to whatever element you want to be clickable (an anchor, div, etc. – the code below is for an anchor):

                    <a href='#' onclick='mapp0.getPoi(0).open(true); return false;'>Click me!</a>

                    ‘mapp0’ means the first map on the page, you can also use the “name” parameter of the shortcode to assign a different name. getPoi(0) means get the first POI, getPoi(1) is the 2nd, and so on. And .open(true) means open and zoom in – set to false to just open the marker.

                    in reply to: To Display Map In Side Bar #12624
                    Chris
                    Keymaster

                      Hi,

                      There’s a sidebar widget that comes with the plugin, or you can use the do_shortcode() function in any template file, e.g.:

                      in reply to: Don't show map if empty in mashup #12615
                      Chris
                      Keymaster

                        Hi,

                        There’s a parameter for that in the shortcode, and a checkbox in the widget. The shortcode is:

                        [mashup hideempty="true" query=...]

                        in reply to: Mashups – Alternative To Using Thumbnails? #12610
                        Chris
                        Keymaster

                          Hi,

                          Are you trying to display this template for mashups or for single posts?

                          If it’s for mashups, you will need to get the postid from the poi rather than relying on the global $post variable:

                          postid) {
                          $post = get_post($poi->postid);
                          …your code here…
                          }
                          ?>

                          You might also want to try just placing that code in your theme to verify that it’s working before trying to use it in the map poi…

                          If that doesn’t help, please send me the template so I can take a look (you can just paste it into the contact form on the site).

                          in reply to: Show only current categories #12598
                          Chris
                          Keymaster

                            Hi,

                            There some examples in the documentation, do they work for you?

                            For example, 5 posts from category ‘mycat’:

                            posts_per_page=5&category_name=mycat

                            Or ALL posts:

                            posts_per_page=-1&category_name=mycat

                            in reply to: displaying map from post custom fileds #12585
                            Chris
                            Keymaster

                              Hi,

                              Use the ‘geocoding’ settings in the MapPress settings screen to define your fields (lat/lng or address). Then go to a post that has those fields and publish it. You should see a map named ‘automatic’ is created.

                              You can’t display a mashup until you create the maps in each post.

                              in reply to: probelm with display mushup #12557
                              Chris
                              Keymaster

                                Hi,

                                I don’t know if I understand your question, but I your mashup doesn’t seem to have a query.

                                If you don’t provide a query, it’ll just show the other maps on the page (and there aren’t any).

                                To see ALL maps, try:
                                [mashup query="all"]

                                in reply to: Map Color Styling #12522
                                Chris
                                Keymaster

                                  Hi,

                                  Yes, there’s a section in the MapPress settings for ‘styled maps’ and some info in the documentation.  You’ll need to use Google’s styled maps tool and then copy the resulting JSON to the plugin settings.

                                Viewing 15 posts - 721 through 735 (of 1,120 total)