Skip to content

Instantly share code, notes, and snippets.

@ChrisCree
Created November 17, 2014 16:35
Show Gist options
  • Select an option

  • Save ChrisCree/37d8e20898582d64dd8e to your computer and use it in GitHub Desktop.

Select an option

Save ChrisCree/37d8e20898582d64dd8e to your computer and use it in GitHub Desktop.
Here is a page template that can be used with the Genesis framework to display only pages with the same layout as the Genesis Archive page template.
<?php
/**
* Page template file to display an archive list of only pages
*
*/
//* Template Name: Archive Pages Only
//* Remove standard post content output
remove_action( 'genesis_post_content', 'genesis_do_post_content' );
remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
add_action( 'genesis_entry_content', 'genesis_page_archive_content' );
add_action( 'genesis_post_content', 'genesis_page_archive_content' );
function genesis_page_archive_content() { ?>
<h4><?php _e( 'Pages:', 'genesis' ); ?></h4>
<ul>
<?php wp_list_pages( 'title_li=' ); ?>
</ul>
<?php
}
genesis();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment