Created
November 17, 2014 16:35
-
-
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.
This file contains hidden or 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 | |
| /** | |
| * 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