How to add a heading above flexible widgets in Front Page 4 section of Wellness Pro

Posted on Leave a comment
5/5 - (197 votes)

In StudioPress forums a user asked:

-On my homepage, on the 4th widget area, I have my 6 latest blog posts posted. I want a title at the top to say “LATEST POSTS”. I thought that I would need 7 widget areas, but when I add the 7th widget, it is placed at the bottom of the posts.

We can edit the code that outputs the FP4 widget area in Wellness Pro and hardcode our desired title/heading.

Tested in Wellness Pro 1.1.4.

Step 1

In front-page.php replace

genesis_widget_area( 'front-page-4', array(
    'before' => '<div id="front-page-4" class="front-page-4"><div class="flexible-widgets widget-area' . wellness_widget_area_class( 'front-page-4' ) . '"><div class="wrap">',
    'after'  => '</div></div></div>',
) );

with

genesis_widget_area( 'front-page-4', array(
    'before' => '<div id="front-page-4" class="front-page-4"><div class="wrap"><h2 class="section-title">Latest Posts</h2></div><div class="flexible-widgets widget-area' . wellness_widget_area_class( 'front-page-4' ) . '"><div class="wrap">',
    'after'  => '</div></div></div>',
) );

“Latest Posts” heading text and tags (h2) can be set/changed in the above.

Step 2

In css/style-front.css above the media queries, add

.front-page-4 {
    padding: 80px 0 40px;
}

.front-page-4 .section-title {
    text-align: center;
    margin-bottom: 20px;
}

.front-page-4 .flexible-widgets .wrap {
    padding: 0;
}

That’s it.

Leave a Reply

Your email address will not be published. Required fields are marked *