In this post, i’ll provide all the working PHP & CSS code i have tested which adds 3 horizontal widgets side by side after the nav menu in the Genesis 2.0 Sample theme by StudioPress.
Click Any Images To Enlarge
The advantage of using this method over others is that you can add more than 3 widgets simply by changing the settings of the Genesis featured posts widget or Genesis featured pages widget.
The code includes:
- PHP for your child themes functions.php file
- PHP for a new home.php file
- CSS for your child themes style.css file
What to do with the code:
- The functions.php code should be pasted at the end of your child themes functions.php file.
- The home.php code goes in a new file which you can create using a code editor like Notepad++ and upload to your child themes folder.
- The CSS code needs to be pasted at the end of your child themes style.css file and you can change the hex code values for the colors if you wish.
Genesis Widget Settings
The above code creates a new widget where you can use these settings for the Genesis featured posts widget:
You could also display the standard loop after your home page widgets or even a grid loop.
Check out the hover color for the read more link buttons!