In the comments section of How to display one Sticky post on homepage in Genesis tutorial, a user asked:
I am using the Enterprise Pro theme and would like to show only one sticky post below the widget top area, essentially replacing the widget bottom area. Can you help me?
This can be done by replacing the code that displays Home Bottom widget area with genesis_custom_loop()
taking in the appropriate arguments.
After the change below the latest sticky post (if there's more than one) will appear in place of Home Bottom widget area on Enterprise Pro's front page. If there's no sticky post, the latest (non-sticky) post will appear.
In front-page.php replace
function enterprise_home_bottom_widgets() { | |
genesis_widget_area( 'home-bottom', array( | |
'before' => '<div class="home-bottom widget-area">', | |
'after' => '</div>', | |
) ); | |
} |
with
To view the full content, please sign up for the membership.
Already a member? Log in below or here.