General
Does PlacePress work with my theme?
Probably. It should work with any modern WordPress theme that is compatible with the block editor, but let us know if you have issues.
Where can I view some examples?
Check out the Showcase / Demo page for examples. Be sure to also refer to the instructions and videos in the User Guide.
Can I change the way PlacePress looks?
We’ve tried to keep the styles as subtle as possible so that PlacePress doesn’t interfere too much with your theme’s overall design. For small tweaks, we encourage you to use your own Custom CSS (available in most themes in the Customize menu), but let us know if you experience major issues or display errors, especially if you use a popular theme.
See also: Theme Customization
How do I change the default map behavior?
You can edit the PlacePress settings in Settings > PlacePress. There you will find options for controlling the default map coordinates, zoom level, basemap style, clustering, and more.
How do I add an image for my locations so they look pretty on the map?
Use the Location Image interface. It works just like the Featured Image on posts.
Can I build my own maps or an external application using a PlacePress API?
You can fetch a JSON feed of mapped Locations at ?feed=placepress_locations_public. You can also use the WP REST API.
Troubleshooting
How do I retrieve and report error messages?
When reporting PlacePress errors, please include the full console message in your post on the PlacePress plugin support forum.
If you get an error like “This block has encountered an error and cannot be previewed” or “This block contains unexpected or invalid content”, you can get the full error message by opening your browser’s Web Console / Dev Tools. Follow the browser-specific instructions here.
I’m getting a 404 (Not Found) error when browsing Locations and/or Tours.
If you have published Locations/Tours and you get a 404 error, it usually means you need to update your permalink settings. Simply go to Settings > Permalinks and press the Save button. You probably don’t need to change the settings for this fix to work. If this doesn’t fix the issue after refreshing your browser, you may be using an incompatible theme (which is unlikely if your theme is from the WordPress theme directory).
The Global Map block is not appearing on my homepage.
Each theme is created differently. Enabling compatibility options may be helpful if your theme does not automatically display PlacePress content in various scenarios. Please review the plugin options at Settings > PlacePress.
If your theme allows you to include a page as one of several component sections of a homepage or front page template, the Homepage Global Map Fix option may be necessary in order to display the global map block. If you are a theme developer, please make sure that your template is parsing blocks of each component section before rendering.
See also: Theme Customization
When browsing tours, clicking on a Tour Stop block opens a new page… OR … When browsing tours, clicking the Tour Stop block does not open the map.
This is the expected behavior. Some themes/sites may be configured to display the full content of tours and other post types when browsing archive pages. Generally, the easiest fix is to add a “More” block after your first paragraph so that users will be required to click through to read the full content on its own page. Tour map functionality only works on the specific page for each tour.
Theme Customization
My theme doesn’t show the Global Map on the Locations archive and/or Location Type archive.
First, ensure that you have turned on the relevant PlacePress plugin setting(s).
If your theme still does not display the map(s), it is likely because your theme does not display the post type description and/or category description by default. You can add something like this to your archive.php template to add support:
if ( is_post_type_archive() ) {
echo get_the_post_type_description();
} elseif ( is_tax() ) {
echo category_description();
}
This will add the map as well as any value you’ve added for Location Type descriptions.
The Author archive page doesn’t show Location and Tour posts… OR… The Tag archive page doesn’t show Location and Tour posts.
PlacePress attempts to address this automatically. However, it is possible for other plugins and themes to overwrite the default functionality using the pre_get_posts hook.
To add custom post types to your author and/or tag archives, you can filter the main post query by adding the following to your functions.php file:
function placepress_pre_get_posts( $query ){
if ( is_admin() || ! $query->is_main_query()) {
return;
}
if (is_author() || is_tag()){
$query->set('post_type', array('post', 'locations', 'tours'));
return;
}
}
add_action( 'pre_get_posts', 'placepress_pre_get_posts' );
This will add Locations and Tours (along with Posts) to all Author archive pages as well as all Tag archive pages.
If another plugin or theme was also modifying queries in this manner, you could change the code above (or other relevant code on your site) to include additional post types to the array, e.g.
$query->set('post_type', array('post', 'locations', 'tours', 'pages', 'portfolio', 'some-other-post-type'));
Feature Requests
I’d like to use a basemap that’s not included in PlacePress
We chose a handful of basemap styles to get started, but plan to add more in the future. If you would like to request a particular basemap, get in touch and we’ll see what we can do. Generally, we only add high-resolution basemaps that are available for free use. As we continue to build out PlacePress, we hope to add support for additional basemaps, including some from paid services like Mapbox.
Can I pay you to add more features or contribute some of my own code?
Maybe. It never hurts to ask. Because we are a small team within a public university, we are most interested in working with academic, government, and non-profit organizations, as well as not-for-profit research projects by individuals and community groups. We prefer to only add features that can be incorporated into the core codebase, and which benefit all PlacePress users. Get in touch if you are interested in collaborating on a new feature.