Under heavy cache conditions, updating the parent theme don’t reflect changes with child theme enabled

You could use the file modification time (filemtime) to trigger a reload (and recache) of the file. This is how I usually enqueue styles (and scripts): $file=”/css/some-styles.css”; wp_enqueue_style( ‘some-styles’, get_stylesheet_directory_uri().$file, array(‘some-dependency’), filemtime(get_stylesheet_directory().$file) ); This results in something like the following: <link rel=”stylesheet” id=’some-styles-css’ href=”https://wordpress.stackexchange.com/questions/130821/.css/some-styles.css?ver=1388657898″ type=”text/css” media=”all” /> You would have to do this for both … Read more

Developing a childtheme, how to disable the parents templates?

As @toscho mentioned it is tricky. But it is doable. Basically you need to find action hooks called before and after the template dropdown is generated and call ob_start() to initiate output buffering and ob_get_clean() to capture the buffered HTML. The ‘submitpage_box’ and ‘edit_page_form’ hooks will work for this, respectively. After you’ve captured the buffered … Read more

Theme customizer: How do you grab the value later?

I made one change… $wp_customize->add_setting( // ID ‘primm_slider_speed’, // Arguments array array( ‘default’ => ‘5000’, ‘type’ => ‘theme_mod’ <– made change right here. ) ); ‘type’ = ‘option’ just didn’t work. ‘type’ = ‘theme_mod’ totally nailed it. Option set manually to 6200, hit save. Refresh home page. Output now: Slider Timing: 6200string(4) “6200” Big Ouch… … Read more

get_template_directory vs get_stylesheet_directory

Why don’t theme developers just use get_stylesheet_directory if it would work for the parent or child theme? The answer is not complicated: “Because you may not want it to work for either the parent or a child theme.” You choose the function that fits the situation. For example, you have a set of files in … Read more

How to solve “Warning: Use of undefined constant” when overriding a parent theme function in the child theme?

Child themes are loaded before the parent theme. That’s why you’re able to replace functions that are wrapped in function_exists(). When themes use function_exists() they are taking advantage of the fact that child themes are loaded first to let the child theme define a function with the same name without throwing an error. The reason … Read more

Child Theme Performance

When you set a child theme, basically WP looks into 2 directories to see if there are some overriding to make. So it adds some impact on performance. The use of @import in child CSS can also have some bad impact on performance grade. Most of the time, it depends on the parent’s theme quality. … Read more

Child theme preview missing

Unfortunately this isn’t covered in that codex page. These previews of the themes aren’t auto generated. You will need to take a screenshot of your theme, and upload that screenshot to your root folder as ‘screenshot.png’. This screenshot will be automatically used then as a theme preview pic for your theme. I quote from the … Read more

Child theme showing a blank page

I think you’ve nothing in the index.php file. So what is happening that the child theme is calling the child theme’s index.php over parent theme’s index.php. And you have nothing on index.php. So the site is showing nothing. Delete the child theme’s index.php. You’ll see the site live.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)