Advertisement
srikat

Untitled

Oct 17th, 2013
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.68 KB | None | 0 0
  1. <?php
  2. /** Start the engine */
  3. include_once( get_template_directory() . '/lib/init.php' );
  4.  
  5. /** Child theme (do not remove) */
  6. define( 'CHILD_THEME_NAME', 'Outreach Theme' );
  7. define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/outreach' );
  8.  
  9. /** Set Localization (do not remove) */
  10. load_child_theme_textdomain( 'outreach', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'outreach' ) );
  11.  
  12. /** Sets Content Width */
  13. $content_width = apply_filters( 'content_width', 650, 450, 960 );
  14.  
  15. /** Load Google fonts */
  16. add_action( 'wp_enqueue_scripts', 'outreach_load_google_fonts' );
  17. function outreach_load_google_fonts() {
  18.     wp_enqueue_style(
  19.         'google-fonts',
  20.         'http://fonts.googleapis.com/css?family=Lato',
  21.         array(),
  22.         PARENT_THEME_VERSION
  23.     );
  24. }
  25.  
  26. /** Add Viewport meta tag for mobile browsers */
  27. add_action( 'genesis_meta', 'outreach_add_viewport_meta_tag' );
  28. function outreach_add_viewport_meta_tag() {
  29.     echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
  30. }
  31.  
  32. /** Add new image sizes */
  33. add_image_size( 'featured', 1040, 400, TRUE );
  34. add_image_size( 'home-sections', 215, 140, TRUE );
  35. add_image_size( 'sidebar', 300, 150, TRUE );
  36.  
  37. /** Create additional color style options */
  38. add_theme_support( 'genesis-style-selector', array(
  39.     'outreach-blue'     =>  __( 'Blue', 'outreach' ),
  40.     'outreach-orange'   =>  __( 'Orange', 'outreach' ),
  41.     'outreach-red'      =>  __( 'Red', 'outreach' )
  42. ) );
  43.  
  44. /** Add support for custom header */
  45. add_theme_support( 'custom-header', array(
  46.     'width'             => 330,
  47.     'height'            => 100,
  48.     'header-selector'   => '#title-area a',
  49.     'header-text'       => false
  50. ) );
  51.  
  52. /** Add support for structural wraps */
  53. add_theme_support( 'genesis-structural-wraps', array(
  54.     'header',
  55.     'nav',
  56.     'subnav',
  57.     'inner',
  58.     'footer-widgets',
  59.     'footer'
  60. ) );
  61.  
  62. /** Reposition the secondary navigation */
  63. remove_action( 'genesis_after_header', 'genesis_do_subnav' );
  64. add_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_subnav' );
  65.  
  66. /** Modify the size of the Gravatar in the author box */
  67. add_filter( 'genesis_author_box_gravatar_size', 'outreach_author_box_gravatar_size' );
  68. function outreach_author_box_gravatar_size( $size ) {
  69.     return '80';
  70. }
  71.  
  72. /** Add the sub footer section */
  73. add_action( 'genesis_before_footer', 'outreach_sub_footer', 5 );
  74. function outreach_sub_footer() {
  75.     if ( is_active_sidebar( 'sub-footer-left' ) || is_active_sidebar( 'sub-footer-right' ) ) {
  76.         echo '<div id="sub-footer"><div class="wrap">';
  77.  
  78.            genesis_widget_area( 'sub-footer-left', array(
  79.                'before' => '<div class="sub-footer-left">'
  80.            ) );
  81.  
  82.            genesis_widget_area( 'sub-footer-right', array(
  83.                'before' => '<div class="sub-footer-right">'
  84.            ) );
  85.  
  86.         echo '</div><!-- end .wrap --></div><!-- end #sub-footer -->';
  87.     }
  88. }
  89.  
  90. /** Add support for 4-column footer widgets */
  91. add_theme_support( 'genesis-footer-widgets', 4 );
  92.  
  93. /** Customizes go to top text */
  94. add_filter( 'genesis_footer_backtotop_text', 'footer_backtotop_filter' );
  95. function footer_backtotop_filter($backtotop) {
  96.     return '[footer_backtotop text="' . __('Top' , 'outreach' ) . '"]';
  97. }
  98.  
  99. /** Register widget areas */
  100. genesis_register_sidebar( array(
  101.     'id'                => 'home-featured',
  102.     'name'          => __( 'Home Featured', 'outreach' ),
  103.     'description'   => __( 'This is the home featured section.', 'outreach' )
  104. ) );
  105. genesis_register_sidebar( array(
  106.     'id'                => 'home-1',
  107.     'name'          => __( 'Home #1', 'outreach' ),
  108.     'description'   => __( 'This is the home #1 section.', 'outreach' )
  109. ) );
  110. genesis_register_sidebar( array(
  111.     'id'                => 'home-2',
  112.     'name'          => __( 'Home #2', 'outreach' ),
  113.     'description'   => __( 'This is the home #2 section.', 'outreach' )
  114. ) );
  115. genesis_register_sidebar( array(
  116.     'id'                => 'home-3',
  117.     'name'          => __( 'Home #3', 'outreach' ),
  118.     'description'   => __( 'This is the home #3 section.', 'outreach' )
  119. ) );
  120. genesis_register_sidebar( array(
  121.     'id'                => 'home-4',
  122.     'name'          => __( 'Home #4', 'outreach' ),
  123.     'description'   => __( 'This is the home #4 section.', 'outreach' )
  124. ) );
  125. genesis_register_sidebar( array(
  126.     'id'                => 'sub-footer-left',
  127.     'name'          => __( 'Sub Footer Left', 'outreach' ),
  128.     'description'   => __( 'This is the sub footer left section.', 'outreach' )
  129. ) );
  130. genesis_register_sidebar( array(
  131.     'id'                => 'sub-footer-right',
  132.     'name'          => __( 'Sub Footer Right', 'outreach' ),
  133.     'description'   => __( 'This is the sub footer right section.', 'outreach' )
  134. ) );
  135.  
  136.  
  137.  
  138.  
  139.  
  140. genesis_register_sidebar( array(
  141.     'id'                => 'below-home-featured',
  142.     'name'          => __( 'Below Home Featured', 'outreach' ),
  143.     'description'   => __( 'This is below the home featured section.', 'outreach' )
  144. ) );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement