• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Template Page Not Getting Loaded

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Template Page Not Getting Loaded

This topic is: not resolved

Tagged: Page Templates, template hierarchy

  • This topic has 2 replies, 2 voices, and was last updated 9 years, 11 months ago by brettatkin.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • February 8, 2016 at 3:30 pm #178605
    brettatkin
    Member

    I have a page called Site Map and have set the Template to be "Archive" under "Page Attributes" area.

    Here is the page actual page as rendered in the browser

    Site Map

    (Query Monitor is showing me that page_archive.php is getting used and not my custom template file.)

    My theme has a page with the following code. The file name is site-map.php.

    <?php
    
    /**
     * Template Name: Archive
     * This is your custom Archive page.
     */
    
    /** 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' );
    /**
     * This function outputs sitemap-esque columns displaying all pages and recent posts.
     *
     * @since 1.6
     */
    function genesis_page_archive_content() { ?>
    
    	<h2><?php _e( 'Pages', 'genesis' ); ?></h2>
    	<ul>
    		<?php wp_list_pages( 'title_li=' ); ?>
    	</ul>
    
    	<h2><?php _e( 'Recent Posts', 'genesis' ); ?></h2>
    	<ul>
    		<?php wp_get_archives( 'type=postbypost&limit=100' ); ?>
    	</ul>
    <?php
    }
    
    genesis();

    What am I doing wrong?

    Thanks,

    Brett

    http://ioipartners.com/site-map/
    February 8, 2016 at 4:13 pm #178606
    Victor Font
    Moderator

    Change the name of the template name to My-Archive or something else different than the supplied Genesis Archive template name. This will assure that you are using the correct template.

    Also, there's a much easier way to customize an archive page these days. The latest versions of the frame work provide you with a filter so you don't need to create a custom template any longer. Here are the details: http://victorfont.com/genesis_sitemap_output-filter/


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    February 9, 2016 at 9:27 am #178654
    brettatkin
    Member

    Thank you for the help Victor. I did have to change the name of the template file.

    I thought child theme pages were supposed to get loaded "last" - supersede the parent theme pages?

    I'll check out your article on the new Sitemap Filter.

    Thanks again.

    Brett

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble