WP Geo with hidden posts
-
I am using WP Geo 3.3.8 on my page to generate maps from posts containing the location of my boat.
I have a positions page with the following code on it that produces a map showing historical positions but only shows the content of the latest post( the post title contains the date and time it was sent).
Received on <?php query_posts('category_name=Position&showposts=1'); ?> <?php while (have_posts()) : the_post(); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php endwhile; ?> [wpgeo_mashup numberposts="50"]I do not want these posts to appear in my normal blog page so have tried adding code similar to this
function exclude_category($query) { if ( $query->is_home() ) { $query->set('cat', '-8'); } return $query; } add_filter('pre_get_posts', 'exclude_category');to funtcions.php as described in many places on the net.
When I do this my position map no longer contains my positions although the Received on xxxxxxxx part shows correctly the title of the last post.
Any ideas?
Chris
The topic ‘WP Geo with hidden posts’ is closed to new replies.