Advertisement
Guest User

functions.php

a guest
Jan 15th, 2014
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.95 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', 'Genesis Sample Theme' );
  7. define( 'CHILD_THEME_URL', 'http://www.studiopress.com/' );
  8. define( 'CHILD_THEME_VERSION', '2.0.1' );
  9.  
  10. //* Enqueue Lato Google font
  11. add_action( 'wp_enqueue_scripts', 'genesis_sample_google_fonts' );
  12. function genesis_sample_google_fonts() {
  13. wp_enqueue_style( 'google-font-lato', '//fonts.googleapis.com/css?family=Lato:300,700', array(), CHILD_THEME_VERSION );
  14. }
  15.  
  16. /** Remove Header */
  17. remove_action( 'genesis_header', 'genesis_do_header' );
  18.  
  19. /** Remove Footer */
  20. remove_action( 'genesis_footer', 'genesis_do_footer' );
  21.  
  22. //* Add HTML5 markup structure
  23. add_theme_support( 'html5' );
  24.  
  25. //* Add viewport meta tag for mobile browsers
  26. add_theme_support( 'genesis-responsive-viewport' );
  27.  
  28. //* Add support for custom background
  29. add_theme_support( 'custom-background' );
  30.  
  31. //* Remove Primary Navigations from Home Page
  32. add_action('get_header', 'child_remove_genesis_do_nav');
  33. function child_remove_genesis_do_nav() {
  34. if (is_front_page()) {
  35. remove_action('genesis_after_header', 'genesis_do_nav');
  36. }
  37. }
  38.  
  39. //* Remove Secondary Navigations from Home Page
  40. add_action('get_header', 'child_remove_genesis_do_subnav');
  41. function child_remove_genesis_do_subnav() {
  42. if (is_home()) {
  43. remove_action('genesis_after_header', 'genesis_do_subnav');
  44. }
  45. }
  46.  
  47. //* Add support for 3-column footer widgets
  48. add_theme_support( 'genesis-footer-widgets', 3 );
  49.  
  50. //* Register widget areas
  51.  
  52. genesis_register_sidebar( array(
  53. 'id' => 'home-top',
  54. 'name' => __( 'Home - Top', 'manta' ),
  55. 'description' => __( 'This is the top section of the home page.', 'manta' ),
  56. ) );
  57. genesis_register_sidebar( array(
  58. 'id' => 'home-cta',
  59. 'name' => __( 'Home - Call To Action', 'manta' ),
  60. 'description' => __( 'This is the call to action section on the home page.', 'manta' ),
  61. ) );
  62. genesis_register_sidebar( array(
  63. 'id' => 'home-slider',
  64. 'name' => __( 'Home - Slider', 'manta' ),
  65. 'description' => __( 'This is the slider section on the home page.', 'manta' ),
  66. ) );
  67. genesis_widget_area( 'home-middle', array(
  68. 'before' => '<div class="home-middle widget-area">',
  69. 'after' => '</div>',
  70. ) );
  71. genesis_register_sidebar( array(
  72. 'id' => 'home-feature-one',
  73. 'name' => __( 'Home - Feature One', 'manta' ),
  74. 'description' => __( 'This is the first featured widget of the home page.', 'manta' ),
  75. ) );
  76. genesis_register_sidebar( array(
  77. 'id' => 'home-feature-two',
  78. 'name' => __( 'Home - Feature Two', 'manta' ),
  79. 'description' => __( 'This is the second featured widget of the home page.', 'manta' ),
  80. ) );
  81. genesis_register_sidebar( array(
  82. 'id' => 'home-feature-three',
  83. 'name' => __( 'Home - Feature Three', 'manta' ),
  84. 'description' => __( 'This is the third featured widget of the home page.', 'manta' ),
  85. ) );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement