Genesis Featured Posts Widget You Can Modify

This code enables you to customize the default Genesis featured posts widget from your child themes folder and modify the code safely so its not lost when Genesis updates.

genesis custom posts widget

The reason i have written this tutorial is because of 2 forum questions i read recently, both of which are pretty much the same question:

I am looking to re-position post meta area before post title with image aligned left.

Code Installation – Beginners Guide

  1. Copy the PHP code from the view raw link in the Gist labelled genesis-post-widget.php and paste it into a new file named genesis-post-widget.php using a code editor like Notepad++.
  2. Upload the file to the root directory of your child themes folder.
  3. Copy the code from the Gist labelled functions.php and paste it at the end of your child themes functions.php file.
  4. You’ll then find a new widget named Genesis Custom Posts under Appearance > Widgets.

Note: You can change the classes in the code or use CSS from any StudioPress child theme for the Genesis Featured Posts widget and change the classes to match what you have in the code of the Genesis Custom Posts widget.

Related Widgets & Plugins


Comments

4 responses to “Genesis Featured Posts Widget You Can Modify”

  1. Debbie Hastings Avatar
    Debbie Hastings

    Hey Brad. I’d like to add some CSS around the month, day, year for this. Is there a way to do that? I’ve been able to do it for post meta on the blog pages, but can’t see to find where to do it for the featured post.

    1. Link to the featured posts widget on a live site please.

  2. Thanks for the code — will come in very handy. Any quick suggestions where to hardcode (for simplicity over updating all of plugin) a line to exclude a category, i.e. basically want to show all post, excluding previously shown, but nothing from Category X.

    1. Brad Dalton Avatar
      Brad Dalton

      Hello Mark

      You can modify the code to exclude a category the same way you would exclude a category using WP_Query but the changes will be hard coded into your custom genesis featured posts widget.

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.