Twenty Ten child theme has post on an inner page. Cant get that page to use my desired template
try this instead <?php get_sidebar(2); ?>
try this instead <?php get_sidebar(2); ?>
It might look more elegant, but you don’t want to nest hooks in this way. You’re now ending up with actions added inside a logic check inside another action hook. Instead, keep your functions as granular and atomic as possible and only hook them in where needed. Your first technique isn’t inefficient at all, it’s … Read more
Generally speaking, Child Themes were originally intended to be able to do two things: Override parent Theme CSS Override parent Theme template files I doubt that the Theme developer intends for the /function-includes/theme-functions.php file to be overridden by a Child Theme. Functional files are usually a core component of the Theme, and allowing a Child … Read more
How it’s NOT done in WordPress The following example is the opposite of how one should do it. Bad practice following: <style type=”text/css”> <!– /* … Definitions that are hard to override or get rid off are here … */ –> </style> This is another example how you should not do it: <link rel=”stylesheet” type=”text/css” … Read more
I found the problem. I went to edit the stylesheet in WordPress’s editor, and saw that the stylesheet’s code had been moved onto 1 line. This meant the top comment section was also on one line, and the Template: twentytwelve was not distinct. Adding line breaks resolved the problem.
I had the same problem and epilektric’s answer put me in the right path. I am using “function” wootheme and it needs to load the parent style.css before another parent css called layout.css. So this order needs to be kept when loading the child theme’s style.css. So basically, to avoid using !important to override all … Read more
I would like to refer back to this answer on one of your previous questions about this subject. As said in that answer, you should never make changes to the twenty thirteen theme, and for that matter, to any theme/plugin you are not the author of, this includes core files as well. But I don’t … Read more
You could try the following if you have a child theme and trying to reference your images from that file location, onto your custom .php files… <img src=”https://wordpress.stackexchange.com/questions/226211/<?php echo get_stylesheet_directory_uri(); ?>/assets/images/your-custom-image.jpg” /> Just make sure in your child theme location, you really have a child folder structure of… assets -> images
In your context you use the wrong constant. You must use the constant STYLESHEETPATH for the path to the active child theme. The constant TEMPLATEPATHget the path to the parent theme, that was referenced in the child theme. But, a important hint. The constant is deprecated, see the ticket #18298 for more information. That’s is … Read more
To clarify this, for anyone using Divi theme (but generally any WP theme), a simple inspection using Dev tools on the “head” for the stylesheet links usually gives a clue about the handle, as Den Isahac mentioned previously (it wasn’t clear as he mentioned it can’t be found). Anything before the “-css” on the ID … Read more