Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Easily create a custom post type archive page such as demoed on [the Yoast Local SEO demo site]( using this file:
/** 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 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment