Is it possible to override this function/class in a child theme?

Is it possible to override this widget function from a parent theme? I saw this blog, but it dealt with a simpler case. http://venutip.com/content/right-way-override-theme-functions parent class Chocolat_Widget_New_Entrys extends WP_Widget { function __construct() {… function widget( $args, $instance ) {… } add_action( ‘widgets_init’, create_function( ”, ‘return register_widget( “Chocolat_Widget_New_Entrys” );’ ) ); I attempted to use remove_action(‘widgets_init’,’???’); … Read more

How to use parent theme’s enqueue methods

According to the codex, when creating a child theme, you have to manually enqueue the parent theme’s scripts. My parent theme has logic to conditionally display various css files, cached css, and dynamic css generated from a Theme Options dashboard. The theme is called Camille. function camille_scripts() { wp_register_style(‘bootstrap’, get_template_directory_uri() . ‘/css/bootstrap.css’); wp_enqueue_style( ‘bootstrap’ ); … Read more

Namespacing WordPress project according to FIG standards

I am trying to wrap my head around the namespaces, autoloaders and FIG standards and most importantly how to achieve their integration to WordPress as close as possible. Here is my file structure, created with help of awesome roots/bedrock WordPress stack. |– /web | |– /app | | |– /mu-plugins | | | |– autoload.php … Read more

Get parent theme version

How do I get the parent theme’s version in a child theme? I want to use it when loading the parent theme’s stylesheet. Here’s how I load the stylesheets in the child theme’s functions.php file: function sometheme_enqueue_styles() { // Get parent theme version $parent_theme_version = wp_get_theme()->parent()->get( ‘Version’ ); // Load parent theme stylesheet wp_enqueue_style( ‘sometheme-style’, … Read more