Instantly share code, notes, and snippets.

What would you like to do?
A cool example of what your locations post type archive page could look like
* Template for displaying a map on the locations post-type archive page.
* @package Twenty_Twelve
* @subpackage Local SEO for WordPress Archive page template
* @author Joost de Valk
if ( function_exists( 'yoast_breadcrumb' ) ) {
yoast_breadcrumb('<p id="breadcrumbs">','</p>');
<div id="primary" class="site-content">
<div id="content" role="main">
$args = array(
'id' => 'all',
'width' => 960,
'height' => 600
echo wpseo_local_show_map( $args );
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>

This comment has been minimized.


jdevalk commented Mar 29, 2013

Note that the Local SEO plugin will output the links to the locations inside the map div, so that when the map isn't loaded, the locations can still be reached. This also makes sure Google will be able to find them.


This comment has been minimized.

BurlesonBrad commented May 19, 2014

Now, for the rest of us....

Where does this go? Is this a page? templates? ...bunch of php that makes a little bit of sense as I gingerly read it? do I implement... whatever-this-is?


This comment has been minimized.

BlazenWeb commented Dec 3, 2014

The code above goes into a new PHP file called archive-wpseo_locations.php which goes in the root of your theme's folder. Further info here:


This comment has been minimized.

bhubbard commented May 12, 2015

I have a more detailed template here -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment