php - Child theme directory in wordpress -


i new in making child theme in wordpress, have problem childtheme. how can change footer.php in child theme if being placed in other directory in parent theme. here is, parent theme puts footer.php under hooks->footer.php parent theme footer directory : parent theme directory

here child theme want change footer directory of child theme ? : child theme directory

here child theme functions.php :

<?php // // recommended way include parent theme styles. //  (please see http://codex.wordpress.org/child_themes#how_to_create_a_child_theme) //   add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() {     wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );     wp_enqueue_style( 'child-style',         get_stylesheet_directory_uri() . '/style.css',         array('parent-style')     ); } // // code goes below // 

the correct method binding parent , child theme using wp_enqueue_scripts action , use wp_enqueue_style() in child theme’s functions.php shown below.

    <?php     function my_theme_enqueue_styles() {         $parent_style = 'parent-style'; // 'twentyfifteen-style'     twenty thirteen theme.      wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );     wp_enqueue_style( 'child-style',         get_stylesheet_directory_uri() . '/style.css',         array( $parent_style ),         wp_get_theme()->get('version')     ); } add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' ); ?> 

check more details in http://www.codextutor.com/creating-child-theme-in-wordpress/

hope you.


Comments