wordpress base theme child url
<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/test.png" alt="" width="" height="" />
wordpress base theme child url
<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/test.png" alt="" width="" height="" />
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
}
how to make a child theme in wordpress
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
create child theme in wordpress
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
function my_theme_enqueue_styles() {
wp_enqueue_style( 'child-style', get_stylesheet_uri(),
array( 'parenthandle' ),
wp_get_theme()->get('Version') // this only works if you have Version in the style header
);
}
how to make a child theme in wordpress
/*
Theme Name: Twenty Fifteen Child
Theme URI: http://example.com/twenty-fifteen-child/
description: >-
Twenty Fifteen Child Theme
Author: John Doe
Author URI: http://example.com
Template: twentyfifteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-fifteen-child
*/
create wp child theme
Let's create a child theme for the TwentyTwentyOne theme:
1) Create a new theme directory:
/wp-content/themes/mychildtheme/
2) Create a style.css file inside the new directory
(/wp-content/themes/mychildtheme/style.css) and add the following code:
/*
Theme Name: Twenty Twenty One Child Theme
Theme URI: https://www.mysite.com/
Description: A Twenty Twenty One child theme
Author: JustMe
Author URI: https://www.mysite.com
Template: twentytwentyone
Version: 1.0.0
*/
@import url("../twentytwentyone/style.css");
3) Go to Appearance > Themes and select the newly create child theme
4) Done!
----------------------------
References and further study
----------------------------
How to Create and Customize a WordPress Child Theme
https://www.hostinger.com/tutorials/how-to-create-wordpress-child-theme
Child Themes at Codex
https://developer.wordpress.org/themes/advanced-topics/child-themes/
How to Create a WordPress Child Theme (Video)
https://www.wpbeginner.com/wp-themes/how-to-create-a-wordpress-child-theme-video/
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us