Include style.css in the Child Theme with PHP

You posted in a comment that the current theme uses the following code in its header.php <link rel=”stylesheet” href=”https://wordpress.stackexchange.com/questions/318269/<?php bloginfo(“template_url’); ?>/style.css” type=”text/css” media=”screen”/> This is not WordPress best practice and hence the linked tutorials fail you. How to go on from this? Copy header.php from parent to child theme, remove the line containing style.css, then … Read more

How to include any template using Shortcode fuction?

You can’t return the include statement. And you shouldn’t use include template parts. And here’s how to do it correctly: function custom_code() { ob_start(); get_template_part( ‘custom-template.php’ ); return ob_get_clean(); } add_shortcode( ‘custom_shortcode’, ‘custom_code’ ); So what we’re doing here is: Start output buffering. Include given template part using get_template_part function. Return all the output generated … Read more

Modifying a child theme

This is a pretty good resource with a lot of details about Child Themes. I would suggest reading the entire thing. You can override any file in your child theme by copying the parent theme’s file and placing it in the same directory of your child theme. For example, to make edits to your footer.php, … Read more

Hestia Child theme creation

Yeah, as you found out you don’t want to edit files directly in your theme because you will lose the changes when the theme updates. Here is some info on child themes, if you haven’t you should read it. For your particular theme, it appears the developer offers a pre-made child theme, you just need … Read more