';
}
/** Add support for custom header */
add_theme_support( 'genesis-custom-header', array(
'width' => 1140,
'height' => 100
) );
/** Add support for custom background */
add_theme_support( 'custom-background' );
/** Sets Content Width */
$content_width = apply_filters( 'content_width', 680, 680, 1020 );
/** Create additional color style options */
add_theme_support( 'genesis-style-selector', array(
'executive-brown' => __( 'Brown', 'executive' ),
'executive-green' => __( 'Green', 'executive' ),
'executive-orange' => __( 'Orange', 'executive' ),
'executive-purple' => __( 'Purple', 'executive' ),
'executive-red' => __( 'Red', 'executive' ),
'executive-teal' => __( 'Teal', 'executive' ),
) );
/** Unregister layout settings */
genesis_unregister_layout( 'content-sidebar-sidebar' );
genesis_unregister_layout( 'sidebar-content-sidebar' );
genesis_unregister_layout( 'sidebar-sidebar-content' );
/** Unregister secondary sidebar */
unregister_sidebar( 'sidebar-alt' );
/** Add new image sizes */
add_image_size( 'featured', 285, 100, TRUE );
add_image_size( 'portfolio', 300, 200, TRUE );
add_image_size( 'slider', 1140, 445, TRUE );
/** Remove the site description */
remove_action( 'genesis_site_description', 'genesis_seo_site_description' );
/** Relocate the post info */
remove_action( 'genesis_entry_header', 'genesis_post_info' );
add_action( 'genesis_entry_header', 'genesis_post_info' );
/** Customize the post info function */
add_filter( 'genesis_post_info', 'post_info_filter' );
function post_info_filter($post_info) {
if (!is_page()) {
$post_info = '
' .
__('by', 'executive' ) . ' [post_author_posts_link] [post_edit]
';
return $post_info;
}
}
/** Change the default comment callback */
add_filter( 'genesis_comment_list_args', 'executive_comment_list_args' );
function executive_comment_list_args( $args ) {
$args['callback'] = 'executive_comment_callback';
return $args;
}
/** Customize the comment section */
function executive_comment_callback( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment; ?>
id="comment-">
$depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
tag because of comment threading */
}
/** Create portfolio custom post type */
add_action( 'init', 'executive_portfolio_post_type' );
function executive_portfolio_post_type() {
register_post_type( 'portfolio',
array(
'labels' => array(
'name' => __( 'Portfolio', 'executive' ),
'singular_name' => __( 'Portfolio', 'executive' ),
),
'exclude_from_search' => true,
'has_archive' => true,
'hierarchical' => true,
'menu_icon' => get_stylesheet_directory_uri() . '/images/icons/portfolio.png',
'public' => true,
'rewrite' => array( 'slug' => 'portfolio' ),
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes', 'genesis-seo' ),
)
);
}
/** Change the number of portfolio items to be displayed (props Bill Erickson) */
add_action( 'pre_get_posts', 'executive_portfolio_items' );
function executive_portfolio_items( $query ) {
if( $query->is_main_query() && !is_admin() && is_post_type_archive( 'portfolio' ) ) {
$query->set( 'posts_per_page', '12' );
}
}
/** Add support for 3-column footer widgets */
add_theme_support( 'genesis-footer-widgets', 3 );
/** Register widget areas **/
genesis_register_sidebar( array(
'id' => 'home-slider',
'name' => __( 'Home - Slider', 'executive' ),
'description' => __( 'This is the slider section on the home page.', 'executive' ),
) );
genesis_register_sidebar( array(
'id' => 'home-top',
'name' => __( 'Home - Top', 'executive' ),
'description' => __( 'This is the top section of the home page.', 'executive' ),
) );
genesis_register_sidebar( array(
'id' => 'home-cta',
'name' => __( 'Home - Call To Action', 'executive' ),
'description' => __( 'This is the call to action section on the home page.', 'executive' ),
) );
genesis_register_sidebar( array(
'id' => 'home-middle',
'name' => __( 'Home - Middle', 'executive' ),
'description' => __( 'This is the middle section of the home page.', 'executive' ),
) );
/** Customize the credits */
add_filter( 'genesis_footer_creds_text', 'custom_footer_creds_text' );
function custom_footer_creds_text() {
echo '';
echo 'Copyright © 2012 - ';
echo date('Y');
echo ' · LONERWOLF.COM. All Rights Reserved. · Designed by Sol & Luna ';
echo '
';
}
// Register newsletter widget area
genesis_register_sidebar( array(
'id' => 'newsletter',
'name' => __( 'Newsletter', 'custom-theme' ),
'description' => __( 'This is the newsletter section.', 'custom-theme' ),
) );
// Add the newsletter widget after the post content
add_action( 'genesis_entry_footer', 'custom_add_newsletter_box' );
function custom_add_newsletter_box() {
if ( is_singular( 'post' ) )
genesis_widget_area( 'newsletter', array(
'before' => '',
'after' => '
',
) );
}
//* Load Cinzel Google fonts
add_action( 'wp_enqueue_scripts', 'custom_load_google_fonts' );
function custom_load_google_fonts() {
wp_enqueue_style( 'google-font', 'http://fonts.googleapis.com/css?family=Cinzel:700', array(), PARENT_THEME_VERSION );
}
/** Remove the post meta function */
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );