Should a child theme share the same theme options row as the parent, or should it have it’s own options row?

Neither. Theme options should be stored as theme mods, using get_theme_mod and set_theme_mod. Internally these map on to options, but it is the official way to store theme specific options, that way when you change themes you don’t get clashes, and your settings are preserved for if you ever change back. It’s the classic adage … Read more

Can I change header.php of current theme through a plugin function?

If you are looking to insert code into the <head></head> block, then this hook does it: add_action( ‘wp_head’, ‘wpse_73900_wp_head’ ); function wpse_73900_wp_head() { ?> <!– Custom Html —> <?php } If that’s not the case, then it’s more difficult. I think it would depend on the theme providing a hook at your desired point of … Read more

How does a Child Theme works?

You are correct, that WordPress will load the style.css file from your parent theme first, and then the style.css from your child theme. These means because of how CSS itself works, you have to specifically override any rule you wish to override. What this means is that you would need to modify the CSS within … Read more

Including files in Child Themes

get_template_directory looks in the parent theme for files. In the case a child theme is being used, the absolute path to the parent theme directory will be returned. Use get_stylesheet_directory() to get the absolute path to the child theme directory. http://codex.wordpress.org/Function_Reference/get_template_directory This file is not meant to be replaced. You will need to find another … Read more

How do I override a sidebar that is registered in a parent theme when using a child theme?

Here is what worked: add_action( ‘after_setup_theme’, ‘parent_override’ ); function parent_override() { unregister_sidebar(‘sidebar-4’); /** I have looked for the ID of the sidebar by looking at * the source code in the admin.. and saw the widget’s id=”sidebar-4″ */ register_sidebar(array( ‘name’ => ‘Footer’, ‘before_widget’ => ‘<div class=”span3″>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<h6 class=”footer-widgets-item”>’, ‘after_title’ => … Read more

Prevent a base themes css file from loading

You can use wp_deregister_style in your child theme. Like this. function remove_unwanted_css() { wp_dequeue_style( ‘bootstrap’ ); wp_deregister_style( ‘bootstrap’ ); wp_dequeue_style( ‘bootstrap-custom’ ); wp_deregister_style( ‘bootstrap-custom’ ); } add_action( ‘wp_enqueue_scripts’, ‘remove_unwanted_css’, 20 ); Similarly you can deregister other unwanted css too. Just add wp_deregister_style in this function.