Today let’s look at a simple snippet that hopefully will help someone:)Task: The client wanted to add badges to some products, depending on the season. First I created four new categories (winter, spring, summer, autumn) and then added the code to functions.php. And styling: /*seasonal badges*/.winter-badge, .spring-badge, .autumn-badge, .summer-badge {padding: 3px 4px;text-align: center;background: #FFFFFF;font-weight: bold;position: […]
hooks
How to Add WordPress Widgets
A clean WordPress theme has no default widgets, which are found in the admin under Appearance>Widgets Code: menu (by default there is no menu) and other elements are added in the same wayadd_theme_support( ‘menus’ ); Here’s a breakdown of the code: Function Definition: custom_theme_setup_support(): This is a custom function name. You can change it to […]