Community Forums › Forums › Archived Forums › General Discussion › How To Show Author Box On Pages
Tagged: author box
- This topic has 1 reply, 2 voices, and was last updated 10 years, 8 months ago by Anita.
-
AuthorPosts
-
July 11, 2013 at 7:13 am #50227Eric McCartyMember
I am set to show the author box on posts, but I want them to show on Pages as well. I'd like the page author to be recognized and I'd like the author verified and showing the pic in Google results for the page. Using Magazine Theme.
Here is my current functions.php
<?php
/** Start the engine */
require_once( get_template_directory() . '/lib/init.php' );/** Child theme (do not remove) */
define( 'CHILD_THEME_NAME', 'Magazine Theme' );
define( 'CHILD_THEME_URL', 'http://www.studiopress.com/themes/magazine' );/** Add Viewport meta tag for mobile browsers */
add_action( 'genesis_meta', 'magazine_add_viewport_meta_tag' );
function magazine_add_viewport_meta_tag() {
echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
}/** Create additional color style options */
add_theme_support( 'genesis-style-selector', array(
'magazine-blue' => 'Blue',
'magazine-green' => 'Green',
'magazine-orange' => 'Orange',
'magazine-purple' => 'Purple',
'magazine-red' => 'Red',
'magazine-teal' => 'Teal'
) );$content_width = apply_filters( 'content_width', 610, 460, 910 );
/** Add support for structural wraps */
add_theme_support( 'genesis-structural-wraps', array(
'header',
'nav',
'subnav',
'inner',
'footer-widgets',
'footer'
) );/** Add new image sizes */
add_image_size( 'home-bottom', 280, 150, TRUE );
add_image_size( 'slider', 600, 250, TRUE );
add_image_size( 'square', 120, 120, TRUE );
add_image_size( 'tabs', 580, 250, TRUE );/** Add support for custom header */
add_theme_support( 'genesis-custom-header', array(
'width' => 960,
'height' => 115
) );/** Add support for custom background */
add_theme_support( 'custom-background' );/** Reposition the primary navigation */
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_before', 'genesis_do_nav' );/** Add after post ad section */
add_action( 'genesis_after_post_content', 'magazine_after_post_ad', 9 );
function magazine_after_post_ad() {
if ( is_single() && is_active_sidebar( 'after-post-ad' ) ) {
echo '<div class="after-post-ad">';
dynamic_sidebar( 'after-post-ad' );
echo '</div><!-- end .after-post-ad -->';
}
}/** Add after content ad section */
add_action( 'genesis_before_footer', 'magazine_after_content_ad' );
function magazine_after_content_ad() {
if ( is_active_sidebar( 'after-content-ad' ) ) {
echo '<div class="after-content-ad">';
dynamic_sidebar( 'after-content-ad' );
echo '</div><!-- end .after-content-ad -->';
}
}/** Add support for 3-column footer widgets */
add_theme_support( 'genesis-footer-widgets', 3 );/** Register widget areas */
http://www.blueridgeparkwaydaily.com/blog/highlights/craggy-gardens-2/
genesis_register_sidebar( array(
'id' => 'home-top',
'name' => __( 'Home Top', 'magazine' ),
'description' => __( 'This is the home top section.', 'magazine' ),
) );
genesis_register_sidebar( array(
'id' => 'home-left',
'name' => __( 'Home Left', 'magazine' ),
'description' => __( 'This is the home left section.', 'magazine' ),
) );
genesis_register_sidebar( array(
'id' => 'home-right',
'name' => __( 'Home Right', 'magazine' ),
'description' => __( 'This is the home right section.', 'magazine' ),
) );
genesis_register_sidebar( array(
'id' => 'home-bottom',
'name' => __( 'Home Bottom', 'magazine' ),
'description' => __( 'This is the home bottom section.', 'magazine' ),
) );
genesis_register_sidebar( array(
'id' => 'after-post-ad',
'name' => __( 'After Post Ad', 'magazine' ),
'description' => __( 'This is the after post ad section.', 'magazine' ),
) );
genesis_register_sidebar( array(
'id' => 'after-content-ad',
'name' => __( 'After Content Ad', 'magazine' ),
'description' => __( 'This is the after content ad section.', 'magazine' ),
) );
add_filter('login_redirect', 'plugin_admin_redirect');
function plugin_admin_redirect($redirect_to, $url_redirect_to = '', $user = null) {
return '/forums';
}
//* Display author box on archive pages
add_filter( 'get_the_author_genesis_author_box_archive', '__return_true' );July 11, 2013 at 7:41 am #50236AnitaKeymasterThis is the code you need to add the author box on your pages - add this to the bottom of your Functions.php. This information was found here -
/** Add Genesis Author Box on Single Pages**/ add_action('genesis_after_post', 'genesis_do_author_box_page'); function genesis_do_author_box_page() { if ( !is_page() ) return; if ( get_the_author_meta( 'genesis_author_box_single', get_the_author_meta('ID') ) ) { genesis_author_box( 'single' ); } }
Copyblogger wrote some specifics for Google Authorship here.
Love coffee, chocolate and my Bella!
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.