Adding "Welcome Text" widget to LifeStyle Pro Theme

Community Forums Forums General Discussion Adding "Welcome Text" widget to LifeStyle Pro Theme

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  digitgirl2 5 months, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #88045

    digitgirl2
    Participant
    Post count: 20

    Hello,

    I’d like to add a welcome text area above the posts on home page.

    I tried adding a “text” to the Home top widget, but when I did this the post disappeared from home page.

    Thanks for the help.

    Robin


    http://www.CPRMedia.net | WordPress Design

    http://ricostudios.com/USAuctions/
    #88073

    nutsandbolts
    Moderator
    Post count: 3111

    Lifestyle Pro is set to either (1) display a widgetized homepage (if you put anything into the home widget areas) or (2) display blog posts like normal (if there’s nothing in the home widget areas). If you want to show blog posts but would like the home top widget to display, you’ll need to do this:

    - Rename front-page.php in your child theme folder to something like front-page-old.php. That will take out the widget areas for the homepage and prevent them from overriding your blog posts.

    - Paste the following into functions.php (be sure to come to the forum to get this code – if you copy and paste from the email notification it will break your site):

    //* Hook Home Top widget area before the loop
    add_action( 'genesis_before_loop', 'lifestyle_home_top_widget' );
    function lifestyle_home_top_widget() {
        if ( is_home() ) {
        genesis_widget_area( 'home-top', array(
    		'before' => '<div class="home-top widget-area"><div class="wrap">',
    		'after' => '</div></div>',
        ) );
    } }
    
    //* Register widget areas
    genesis_register_sidebar( array(
    	'id'          => 'home-top',
    	'name'        => __( 'Home - Top', 'lifestyle' ),
    	'description' => __( 'This is the top section of the homepage.', 'lifestyle' ),
    ) );

    That will give you a Home Top widget area but also allow blog posts to show under it. Hope that helps!


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #88201

    digitgirl2
    Participant
    Post count: 20

    Thanks! This is exactly what I needed. Worked like a charm.


    http://www.CPRMedia.net | WordPress Design

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.