Duplicate and change a Theme Widget

Widgets extend the Widget Class, search in the theme code for a class that extends WP_Widget. Copy/Paste it, rename it, and change what you’d like. You can also look in the file wp-includes/default-widgets.php and use one of those as a starting point.

WP admin bar only on some pages

First of all i would like to thank you for trying to help me!! i found out what was causing it: it was an error on the functions.php: it was missing: require get_template_directory() . ‘/inc/template-tags.php’; i have added it back to the functions.php and now everything seems to be working fine. Thank you! =)

Edit theme wp_head

You can remove some default WP links of the head by using remove_action(). For example: // Removes the wlwmanifest link remove_action( ‘wp_head’, ‘wlwmanifest_link’ ); // Removes the RSD link remove_action( ‘wp_head’, ‘rsd_link’ ); // Removes the WP shortlink remove_action( ‘wp_head’, ‘wp_shortlink_wp_head’, 10, 0 ); // Removes the canonical links remove_action( ‘wp_head’, ‘rel_canonical’ ); // Removes … Read more

How to create a theme option-menu page to save user values

update: All the following code should go into your functions.php file Probably the best (and definitely the easiest) way to make a Theme Options Page is to use the WordPress Settings API. One note… everywhere you see THEME_NAME in my code, just replace this with some unique phrase (I use my theme name). First we … Read more

register_theme_directory and broken deploys

There is a bug in class-wp-upgrader.php: WordPress is using the fixed path WP_CONTENT_DIR . ‘/themes’ and doesn’t use get_theme_root(). I have written a patch 7 months ago … which was too late for WordPress 3.6 – the fix was delayed just today. So use my patch, or jump in on Trac and explain why this … Read more

How do I change Twenty Nineteen’s primary color without using the color slider in the theme customizer?

That’s indeed an interesting question. Looking at the following issues – both closed as won’t fix – I’d reason that replacing this color slider with a color picker is not recommended: https://github.com/WordPress/twentynineteen/issues/613 https://core.trac.wordpress.org/ticket/45619 Thing is, that Twenty Nineteen calculates the colors that will be displayed in the frontend from hue, saturation and lightness (HSL). And … Read more