Community Forums › Forums › Archived Forums › General Discussion › Exclude Authors Section From Archive Page
This topic is: resolved
Tagged: archive page, authors
- This topic has 2 replies, 2 voices, and was last updated 10 years, 11 months ago by
nma123.
Viewing 3 posts - 1 through 3 (of 3 total)
-
AuthorPosts
-
November 11, 2015 at 4:26 am #170731
nma123
MemberI've imported page_archive.php into the Beautiful Pro child theme but can't work out how to edit it to exclude Authors from the Site Map
<?php /** * Genesis Framework. * * WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances. * Please do all modifications in the form of a child theme. * * @package Genesis\Templates * @author StudioPress * @license GPL-2.0+ * @link http://my.studiopress.com/themes/genesis/ */ //* Template Name: Archive //* 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, * categories, authors, monthly archives, and recent posts. * * @since 1.6 * * @uses genesis_a11y() to check for headings choice. * @uses genesis_sitemap() to generate the sitemap. * */ function genesis_page_archive_content() { $heading = ( genesis_a11y( 'headings' ) ? 'h2' : 'h4' ); genesis_sitemap( $heading ); } genesis();November 11, 2015 at 5:44 am #170735Victor Font
ModeratorSince the Genesis 2.2 release, there is a new filter for the sitemap. I tested the following with the Altitude Pro theme. Add this code to your functions.php and see if it helps:
add_filter( 'genesis_sitemap_output', 'vmf_sitemap' ); function vmf_sitemap() { $heading = ( genesis_a11y( 'headings' ) ? 'h2' : 'h4' ); $sitemap = sprintf( '<%2$s>%1$s</%2$s>', __( 'Pages:', 'genesis' ), $heading ); $sitemap .= sprintf( '<ul>%s</ul>', wp_list_pages( 'title_li=&echo=0' ) ); $sitemap .= sprintf( '<%2$s>%1$s</%2$s>', __( 'Categories:', 'genesis' ) , $heading ); $sitemap .= sprintf( '<ul>%s</ul>', wp_list_categories( 'sort_column=name&title_li=&echo=0' ) ); $sitemap .= sprintf( '<%2$s>%1$s</%2$s>', __( 'Monthly:', 'genesis' ) , $heading ); $sitemap .= sprintf( '<ul>%s</ul>', wp_get_archives( 'type=monthly&echo=0' ) ); $sitemap .= sprintf( '<%2$s>%1$s</%2$s>', __( 'Recent Posts:', 'genesis' ) , $heading ); $sitemap .= sprintf( '<ul>%s</ul>', wp_get_archives( 'type=postbypost&limit=100&echo=0' ) ); return $sitemap; }Make sure you delete the page_archive you imported into Beautiful Pro. You don't need it.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?November 11, 2015 at 6:09 am #170736nma123
MemberThanks
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
- The topic ‘Exclude Authors Section From Archive Page’ is closed to new replies.