I recently announced that I changed my preferred WordPress theme from Thesis to Genesis and now I am in the customization stage. I am getting to know Genesis 2 very quickly.
One customization I wanted to implement was to add a widget to the bottom of a post. There definitely was a tutorial for this on the Genesis website but it did not work for me. I guess these tutorials are not meant for Genesis 2 and the new HTML 5 enabled themes.
Anyway lets get down to business.
How to add a widget to the bottom of your posts
- All code supplied can be used at your own risk. Please backup your files before editing.
- For Genesis 2 all code will be pasted into the functions.php unless stated otherwise. Like Css goes into the style.css.
- I had to add the code in as a screenshot as people were republishing my articles and making a mess of the code. There is a link below to see the full code to copy.
Ok here is the tutorial.
First we need to create the widget
This will create a widget called New Genesis Box and it will be available in your Appearance / widget area.
If you try and use this widget now, it will not show up on your site yet, therefore we need to place this widget somewhere in order for it to work.
See the full code details in the Tips4pc Forum. Both these code snippets go into the functions.php file of your Genesis 2 child theme.
Now if you fill your widget with content it will show up in the genesis_entry_footer which is at the bottom of your posts. Earlier the code did not work for me as there are new hook references for Genesis 2.
To style your widget you just need to reference it as .new-genesis-widget in your style.css.
border: 1px solid #ddd;
My next step will be moving these new widgets around to make them look great.