Creating a Widget
Categories: Child Themes, CSS, Widgets, Wordpress
ToolBox
-
Steps to Creating a Widget in WordPress:
(Tested on Genesis Child Theme News)
-
Register a Component (Within functions.php)
- Copy the existing widget area in the code
- Paste the existing widget area code in the location you'd like the new widget to appear. Rename the widget in the code.
- Click Update to save the code changes.
-
Place the Component (Within home.php; though it may be default.php, or page.php depending on the theme)
- Copy the existing widget area in the code
- Paste the existing widget area code in the location you'd like the new widget to appear. Rename the widget in the code.
- Click Update to save the code changes.
-
Create the Item's Stylesheet
- Copy the existing widget area in the code styles
- Paste the existing widget area code in the location you'd like the new widget to appear. Rename the widget in the code.
- Change the style if necessary
- Click Update to save the code changes.
Leave a Reply!