Genesis Sandbox Featured Content Widget. Based on Nick Croft's Genesis Featured Widget Amplified for additional functionality which allows support for custom post types, taxonomies, and extends the flexibility of the widget via action hooks to allow the elements to be re-positioned or other elements to be added.
I noticed that the featured posts' title is not being wrapped in a <header> block. The StudioPress themes using HTML5 output their featured posts (standard Genesis Featured Posts widget) with the following structure:
The default CSS styling for, say the by line, relies on this structure and these classes. Specifically, they target .content .entry-header .entry-meta. So the header with its class, and the entry-meta class on the post-info <p> (which is not included in the output from this plugin).
It's easy enough to add the class in, but I thought I'd take a look at wrapping the title/byline and adding in a wrap for the post-meta with footer, if genesis_html5() returned true as a PR.
The problem is, the plugin creates and prints both parts separately. I see at least two options, but I thought I'd see which you'd prefer for a PR (or if you have a different idea):
Merge the current do_byline() and do_post_title() functions into one function, generate the entire <header> section, and print it.
Output the <header> wrap between both functions:
If byline position set to after title, output opening <header> in do_post_title().
If byline position set to before title, output closing </header> in do_post_title().
If byline position is set to after title, output closing </header> in do_byline().
If byline position is set to before title, output opening <header> in do_byline().
The latter is a bit more confusing, but I wanted your preference on which way to go with that.
I think for <footer> I can put that into the post-meta output.
On a related note, the latest HTML5 themes are also now correctly using <h1> instead of <h2> for the article title. I can submit a PR to conditionally handle that, too, if you'd like.
I noticed that the featured posts' title is not being wrapped in a
<header>
block. The StudioPress themes using HTML5 output their featured posts (standard Genesis Featured Posts widget) with the following structure:The default CSS styling for, say the by line, relies on this structure and these classes. Specifically, they target
.content .entry-header .entry-meta
. So the header with its class, and theentry-meta
class on the post-info<p>
(which is not included in the output from this plugin).It's easy enough to add the class in, but I thought I'd take a look at wrapping the title/byline and adding in a wrap for the post-meta with
footer
, if genesis_html5() returned true as a PR.The problem is, the plugin creates and prints both parts separately. I see at least two options, but I thought I'd see which you'd prefer for a PR (or if you have a different idea):
do_byline()
anddo_post_title()
functions into one function, generate the entire<header>
section, and print it.<header>
wrap between both functions:<header>
indo_post_title()
.</header>
indo_post_title()
.</header>
indo_byline()
.<header>
indo_byline()
.The latter is a bit more confusing, but I wanted your preference on which way to go with that.
I think for
<footer>
I can put that into the post-meta output.On a related note, the latest HTML5 themes are also now correctly using
<h1>
instead of<h2>
for the article title. I can submit a PR to conditionally handle that, too, if you'd like.