How to add Color Picker in Theme Options for the following?

Your not going to get an answer to this, there is no magic wand you can use to change what your asking without working it out yourself, or at the very least supplying some actual code with your question. To change the CSS in a back-end option page you can use the Options API, http://codex.wordpress.org/Options_API, … Read more

Git vs Child Theme

While I know version control approach to be used in practice, I don’t think it’s too common. WP has weak version control practices in general, so development of extensions doesn’t quite plan for such. Example of specific scenario which will cause issues might be changes in template hierarchy. Let’s say you customized single.php in version … Read more

How to Add Customizer Setting in Child Theme

OK, check out the theme developer handbook. $wp_customize->add_control( ‘reblog_number_control’, array( ‘label’ => __( ‘Number of Reblogs’, ‘tesseract-child’ ), ‘section’ => ‘tesseract_footer_options’, ‘settings’ => ‘number_of_reblogs’, ‘type’ => ‘text’, ‘priority’ => 10 ) ); Since you are in the child theme ‘title’ => __( ‘Reblog Options’, ‘tesseract’ ), shoudl be ‘title’ => __( ‘Reblog Options’, ‘tesseract-child’ ), … Read more

get_parent_theme_file_path vs. get_template_directory

Is there a specific reason to use get_parent_theme_file_path() over get_template_directory() Yes. This new function comes with a filter Filter parent_theme_file_path And argument to the file path If you take a look at the get_parent_theme_file_path() source, it’s just returning get_template_directory() with extra functionality like if a file is given as an argument to the get_parent_theme_file_path it … Read more

Declaring an instance of class included in parent theme from child theme functions.php

Handle all the class loading in your parent theme on a predictable action (point in time) and hook in later in your child theme. Example: add_action( ‘wp_loaded’, ‘parent_prefix_load_classes’, 10 ); function parent_prefix_load_classes() { $classes = [ ‘Extra_Comment_Walker’, ‘Extra_Nav_Menu_Walker’ ]; foreach ( $classes as $class ) { locate_template( “php/class.$class.php”, TRUE, TRUE ); } } Create instances … Read more