Skip to content

Instantly share code, notes, and snippets.

@carasmo
Last active February 23, 2016 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carasmo/ff6e0d9687a7addfe8bd to your computer and use it in GitHub Desktop.
Save carasmo/ff6e0d9687a7addfe8bd to your computer and use it in GitHub Desktop.
author.php page in Genesis showing only the title with the title filtered to change the h2 into h3 -- see the other gist https://gist.github.com/carasmo/70a4fd9cc27d5822e03a to get pagination.
<?php
/**
* Template Name: Author Page
*/
remove_action( 'genesis_loop', 'genesis_do_loop' );
function child_do_custom_loop( ) {
echo '<ul class="entry-content">';
if ( have_posts() ) : while ( have_posts() ) : the_post();
printf( '<li class="%s">', join( ' ', get_post_class() ) );
do_action( 'genesis_before_post_title' );
do_action( 'genesis_post_title' );
do_action( 'genesis_after_post_title' );
echo '</li>'; //* end .entry
endwhile; //* end of one post
echo '</ul>'; //* close .entry-content
do_action( 'genesis_after_endwhile' );
endif; //* end loop
wp_reset_query();
}
add_action( 'genesis_loop', 'child_do_custom_loop' );
//** filter the h2 into h3 for the genesis_post_title
function christina_post_title_output( $title ) {
if ( is_author() )
$title = get_the_title();
$permalink = sprintf( '<a href="%s" rel="bookmark">' . $title . '</a>', get_permalink() );
$title = sprintf( '<h3 class="entry-title">' . $permalink . '</h3>', apply_filters( 'genesis_post_title_text', get_the_title()) );
return $title;
}
add_filter( 'genesis_post_title_output', 'christina_post_title_output', 15 );
genesis();
@carasmo
Copy link
Author

carasmo commented Feb 23, 2016

The last one missed the link on the $title for the filter, ooooops! This is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment