Answers for "how to add files in child theme in theme editor"

PHP
2

how to make folder in child theme in theme editer

/*
 Theme Name:   WPB Child Theme
 Theme URI:    https://www.wpbeginner.com
 Description:  A Twenty Thirteen child theme 
 Author:       WPBeginner
 Author URI:   https://www.wpbeginner.com
 Template:     twentythirteen
 Version:      1.0.0
*/
 
@import url("../twentythirteen/style.css");
 
.site-title {
padding: 30px 0 30px;
}
 
.site-header .home-link {
min-height: 0px;
}
 
.navbar {
background-color: #e8e5ce;
}
 
.widget { 
background-color: #e8e5ce;
}
.site-footer {
background-color: #d8cdc1;
} 
.site-footer .sidebar-container { 
background-color:#533F2A
}
Posted by: Guest on October-28-2020
0

how to add files in child theme in theme editor

add_action('after_setup_theme', function() {
	$file = get_stylesheet_directory() . '/my-file.php';
	if(!file_exists($file)) {
		include_once ABSPATH . 'wp-admin/includes/file.php';
		\WP_Filesystem();
		global $wp_filesystem;
		$wp_filesystem->put_contents($file, '', FS_CHMOD_FILE);
	}
});
Posted by: Guest on October-28-2020
0

how to add files in child theme in theme editor

add_action('after_setup_theme', function() {
	$file = get_stylesheet_directory() . '/my-file.php';
	touch($file);
});
Posted by: Guest on October-28-2020

Code answers related to "how to add files in child theme in theme editor"

Browse Popular Code Answers by Language