Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * Digital Raindrops added
- * This function will run after the parents functions.php
- */
- add_action( 'after_setup_theme', 'post_theme_setup' );
- /**
- * Create a pluggable Function in our child theme
- */
- if ( !function_exists( 'post_theme_setup' ) ):
- function post_theme_setup() {
- /* Code goes here! */
- // This theme uses wp_nav_menu() in one location.
- register_nav_menus( array(
- 'header' => __( 'Header Navigation', 'twentyten' ),
- 'footer' => __( 'Footer Navigation', 'twentyten' ),
- ) );
- // Remove the default menu function
- function tnc_remove_default_menu() {
- unregister_nav_menu( 'primary' );
- }
- add_action('after_setup_theme', 'tnc_remove_default_menu', 11);
- /**
- * Change the header width here
- */
- add_filter( 'twentyten_header_image_width', 'my_header_width' );
- function my_header_width($width) {
- $width = 980;
- return $width;
- }
- /**
- * Change the header width here
- */
- add_filter( 'twentyten_header_image_height', 'my_header_height' );
- function my_header_height($height) {
- $height = 224;
- return $height;
- }
- // Remove the default menu function
- function tnc_remove_default_menu() {
- unregister_nav_menu( 'primary' );
- }
- add_action('after_setup_theme', 'tnc_remove_default_menu', 11);
- // Remove parent theme widgets by calling unregister_sidebar()
- function tnc_remove_widgets(){
- unregister_sidebar( 'fourth-footer-widget-area' );
- }
- add_action( 'widgets_init', 'tnc_remove_widgets', 11 );
- // Register new widgetized areas
- function tnc_widgets_init() {
- // Area 1a, below Area 1 to the left.
- register_sidebar( array(
- 'name' => __( 'Left Widget Area', 'twentyten' ),
- 'id' => 'left-widget-area',
- 'description' => __( 'Left widget area', 'twentyten' ),
- 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
- 'after_widget' => '</li>',
- 'before_title' => '<h3 class="widget-title">',
- 'after_title' => '</h3>',
- ) );
- // Area 1b, below Area 1 to the right.
- register_sidebar( array(
- 'name' => __( 'Right Widget Area', 'twentyten' ),
- 'id' => 'right-widget-area',
- 'description' => __( 'Right widget area', 'twentyten' ),
- 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
- 'after_widget' => '</li>',
- 'before_title' => '<h3 class="widget-title">',
- 'after_title' => '</h3>',
- ) );
- }
- /** Register sidebars by running twentyten_widgets_init() on the widgets_init hook. */
- add_action( 'widgets_init', 'tnc_widgets_init' );
- }
- endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement