Created
December 3, 2013 11:31
-
-
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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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