Hayes: Change Grid Post Feed Layout (for 4 or 8 count layouts)

In the Hayes theme, the Blog Feed Options include a post layout called Grid Feed. It formats similar to this, as seen in Hayes Demo 1:

By default, 4- and 8-count Grid Feeds format with all posts stacking in a 2-column format, as seen here:

Users who have opted to show either 4 or 8 posts in any Post Feed layout with Grid may opt to enable this Code Hack to change how those posts format. When in use:

  • For 4-count post displays, all four posts will display inline, in a single row.
  • For 8-count post displays, posts will display in two rows, with four posts per row.

Here is an example of this Code Hack in action (with a 4-count post display):

And here's the code you need to implement it! Don't forget, you must have selected the Grid Feed layout in Post Feeds 1, 2 or 3, and set "Number Posts to Display" with the Grid Feed layout as either 4 or 8 for this Code Hack to work.