Skip to content

Instantly share code, notes, and snippets.

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 jeremyescott/314240cebd01e86ce721cd3dbb5105c9 to your computer and use it in GitHub Desktop.
Save jeremyescott/314240cebd01e86ce721cd3dbb5105c9 to your computer and use it in GitHub Desktop.
Process Shortcodes in Genesis Author Meta
<?php
// Process Shortcodes from Genesis Author Meta
remove_action( 'genesis_before_loop', 'genesis_do_author_box_archive', 15 );
add_action( 'genesis_before_loop', 'CUSTOM_do_author_box_archive', 15 );
// Copied from /genesis/lib/structure/archive.php:98
function CUSTOM_do_author_box_archive() {
if ( ! is_author() || get_query_var( 'paged' ) >= 2 )
return;
if ( get_the_author_meta( 'genesis_author_box_archive', get_query_var( 'author' ) ) )
// second arg, false, returns as string as opposed echo.
$author_box = genesis_author_box( 'archive', false );
// filter with do_shortcode
echo do_shortcode( $author_box );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment