Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /** Start the engine */
- require_once( get_template_directory() . '/lib/init.php' );
- /** Child theme (do not remove) */
- define( 'CHILD_THEME_NAME', 'News Theme' );
- define( 'CHILD_THEME_URL', 'http://www.studiopress.com/themes/news' );
- /** Add Viewport meta tag for mobile browsers */
- add_action( 'genesis_meta', 'news_add_viewport_meta_tag' );
- function news_add_viewport_meta_tag() {
- echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
- }
- $content_width = apply_filters( 'content_width', 580, 430, 910 );
- /** Create additional color style options */
- add_theme_support( 'genesis-style-selector', array(
- 'news-green' => 'Green',
- 'news-orange' => 'Orange',
- 'news-pink' => 'Pink',
- 'news-purple' => 'Purple',
- 'news-red' => 'Red',
- 'news-teal' => 'Teal'
- ) );
- /** Add support for structural wraps */
- add_theme_support( 'genesis-structural-wraps', array(
- 'header',
- 'nav',
- 'subnav',
- 'inner',
- 'footer-widgets',
- 'footer'
- ) );
- /** Add after post ad section */
- add_action( 'genesis_after_post_content', 'news_after_post_ad', 9 );
- function news_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 new image sizes */
- add_image_size( 'home-bottom', 110, 110, TRUE );
- add_image_size( 'home-middle-left', 280, 165, TRUE );
- add_image_size( 'home-middle-right', 50, 50, TRUE );
- add_image_size( 'home-tabs', 150, 220, TRUE );
- /** Add support for custom header */
- add_theme_support( 'genesis-custom-header', array(
- 'width' => 960,
- 'height' => 100
- ) );
- /** Add support for custom background */
- add_theme_support( 'custom-background' );
- /** Remove the post meta function */
- remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
- /** Modify the author box title */
- add_filter( 'genesis_author_box_title', 'author_box_title' );
- function author_box_title() {
- return '<h2>About the Author</h2>';
- }
- /** Customize the entire footer */
- remove_action( 'genesis_footer', 'genesis_do_footer' );
- add_action( 'genesis_footer', 'custom_footer' );
- function custom_footer() {
- ?>
- <p>© Copyright 2013 <a href="http://www.virtualizationsoftware.com/">VirtualizationSoftware.com</a> · All Rights Reserved</p>
- <?php
- }
- //***Customize the Post Info**/
- add_filter( 'genesis_post_info', 'bourncreative_post_info_filter' );
- function bourncreative_post_info_filter( $post_info ) {
- return 'By [post_author_posts_link] | [post_date] | <a href="' . get_permalink() . '#disqus_thread">View Comments</a>';
- }
- /** Reposition the secondary navigation */
- remove_action( 'genesis_after_header', 'genesis_do_subnav' );
- add_action( 'genesis_before', 'genesis_do_subnav' );
- /** Add after content ad section */
- add_action( 'genesis_before_footer', 'news_after_content_ad' );
- function news_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 -->';
- }
- }
- /** Customize the post meta function */
- add_filter( 'genesis_post_meta', 'post_meta_filter' );
- function post_meta_filter($post_meta) {
- if ( !is_page() ) {
- $post_meta = '[post_tags before="Dive Deeper: "]';
- return $post_meta;
- }}
- /** Add support for 3-column footer widgets */
- add_theme_support( 'genesis-footer-widgets', 3 );
- /** Register widget areas */
- genesis_register_sidebar( array(
- 'id' => 'home-top',
- 'name' => __( 'Home Top', 'news' ),
- 'description' => __( 'This is the home top section.', 'news' ),
- ) );
- genesis_register_sidebar( array(
- 'id' => 'home-middle-left',
- 'name' => __( 'Home Middle Left', 'news' ),
- 'description' => __( 'This is the home middle left section.', 'news' ),
- ) );
- genesis_register_sidebar( array(
- 'id' => 'home-middle-right',
- 'name' => __( 'Home Middle Right', 'news' ),
- 'description' => __( 'This is the home middle right section.', 'news' ),
- ) );
- genesis_register_sidebar( array(
- 'id' => 'home-bottom',
- 'name' => __( 'Home Bottom', 'news' ),
- 'description' => __( 'This is the home bottom section.', 'news' ),
- ) );
- genesis_register_sidebar( array(
- 'id' => 'after-post-ad',
- 'name' => __( 'After Post Ad', 'news' ),
- 'description' => __( 'This is the after post ad section.', 'news' ),
- ) );
- genesis_register_sidebar( array(
- 'id' => 'after-content-ad',
- 'name' => __( 'After Content Ad', 'news' ),
- 'description' => __( 'This is the after content ad section.', 'news' ),
- ) );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement