Reputation: 4818
I'm starting learning Wordpress development, and I'm stuck trying to create a child theme. Below I enumerate the steps I followed to see if someone can help me:
Inside, I've created a file 'style.css' with the following content:
/* Theme Name: Shoptest Theme URI: http://www.testsite.com Description: Shop Isle child theme Author: Felip Template: shop-isle 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: shop-isle */
I created a file 'functions.php' with the following:
I've activated the theme in Wordpress dashboard
In theory, if I change/add something in the child file, the webpage should reflect that change, right? I've tried but it does nothing. Just for testing, if I change anything on the original footer.php file, it's immediately changed in the website.
What am I doing wrong?
Upvotes: 1
Views: 652
Reputation: 29
Wordpress doesn't work this way as you think.
You should write your changes as a function and put it in functions.php of your child theme. Then use the wp_footer hook to hook your changes to the footer.
like below
function my_custom_changes() {
// add your code
}
add_action('wp_footer', 'my_custom_changes' );
Upvotes: 0