Get Parent Theme Author Name

Thanks for all the help which pointed me in the right direction. In the end I used the following: $style_parent_theme = wp_get_theme(get_template()); $style_parent_theme_author = $style_parent_theme->get( ‘Author’ ); I use get_template() to recover the folder name of the parent theme. wp_get_theme then get’s the theme object. Once we have that we can manipulate the object to … 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

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

My child theme doesn’t work Error: “The parent theme is missing. Please install your parent theme”

There are three things to check: Is your parent theme complete and what is the exact spelling of the parent theme’s name in its style.css. Uppercase and lowercase are important. Is the child theme directory named parentname-child. It should be in the themes directory, not in a subdirectory of the parent theme. Does the child … Read more

Issues enqueueing parent & child theme stylesheets with revised Codex method

QUESTION 1 Is it safe to include the assumption that parent themes properly enqueue the child theme styles, from the standpoint of child theme standards? General rule of thumb, yes. But, you should never assume. Most disasters and failures in live are due to assumptions or facts based on an assumption FACTS WITHOUT ASSUMPTIONS A … Read more

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