Skip to content

Instantly share code, notes, and snippets.

@jdevalk
Created December 3, 2013 11:31
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save jdevalk/7767709 to your computer and use it in GitHub Desktop.
Save jdevalk/7767709 to your computer and use it in GitHub Desktop.
Easily create a custom post type archive page such as demoed on [the Yoast Local SEO demo site](http://local.yoastdemo.com/locations/) using this file:
<?php
/** Replace the standard loop with our custom Locations loop */
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'wpseo_locations_archive_loop' );
function wpseo_locations_archive_loop() {
echo '<h1>Locations</h1>';
echo '<div class="entry-content"><p>Your intro text here.</p></div>';
$args = array(
'id' => 'all',
'width' => 960, // Feel free to adjust width and height.
'height' => 600
);
echo wpseo_local_show_map( $args );
}
genesis();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment