Include widget file in functions.php of child theme

Okay, so after a couple of days pulling my hair out, I finally realized that I needed to add the following line, after the require_once line in functions.php: add_action(‘widgets_init’, ‘wpb_load_widget’); … and everything then worked perfectly. (where wpb_load_widget is the name of my register-widget function in the widget file itself.)

Child Theme style.css changes aren’t showing. Parent “style-less.css” over rides it, and won’t update

You must enqueue your child theme’s stylesheet from the child theme’s functions.php file, as you would any other stylesheet. Specifying the parent theme’s stylesheet handle as a dependency is a good measure to ensure the proper load order. function wpse406477_enqueue_child_styles() { wp_enqueue_style( ‘mychild-style’, get_stylesheet_uri(), [ ‘parent-style’ ] ); } add_action( ‘wp_enqueue_scripts’, ‘wpse406477_enqueue_child_styles’ ); Note that … Read more

Show excerpt and not full post in Twenty Seventeen

You can do this with just a couple of files, no need for a plugin. On your computer… Create a folder twentyseventeen-excerpt Add the file style.css: /** * Theme Name: Twenty Seventeen Excerpt * Template: twentyseventeen * Version: 1.0 * Theme URI: https://wordpress.stackexchange.com/q/406641/1685 * Author: the WordPress team * Author URI: https://wordpress.org/ * Description: Twenty … Read more