Files
yeuchaybo/lib/views/page-sitemap.php
T
Thuan Bui fd25f13a4f Initial
2018-06-26 11:09:22 +07:00

50 lines
1.2 KiB
PHP

<?php
/**
* Child Theme Library
*
* WARNING: This file is a part of the core Child Theme Library.
* DO NOT edit this file under any circumstances. Please use
* the functions.php file to make any theme modifications.
*
* Template Name: Sitemap
*
* @package SEOThemes\ChildThemeLibrary\Views
* @link https://github.com/seothemes/child-theme-library
* @author Thuan Bui
* @copyright Copyright © 2018 Thuan Bui
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'ABSPATH' ) ) {
die;
}
// 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', 'child_theme_page_archive_content' );
add_action( 'genesis_post_content', 'child_theme_page_archive_content' );
/**
* This function outputs sitemap-esque columns displaying all pages,
* categories, authors, monthly archives, and recent posts.
*
* @since 1.0.0
*
* @return void
*/
function child_theme_page_archive_content() {
$heading = ( genesis_a11y( 'headings' ) ? 'h2' : 'h4' );
genesis_sitemap( $heading );
}
genesis();