Homepage a blog but with slider?

Community Forums Forums Design Tips and Tricks Homepage a blog but with slider?

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  Susan 1 year, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #58344

    dev
    Participant
    Post count: 467

    I have a client who would like his homepage in Agency or similar theme to be a blog, but he also wants a slider on it.

    How do you do that with Genesis. Once you populate the Slider widget area, you lose the blog and it becomes a widgetized home page.

    There must be an easy way around this, but I’ve not figured it out yet.

    Maybe it takes some code?

    Help appreciated.

    Thanks.

    #58354

    Susan
    Moderator
    Post count: 9406

    Dev, I just tested this using the Eleven40Pro theme (which is designed as a blog)

    I added this code to the bottom of my functions.php file:
    [php]
    /** Register widget areas */
    genesis_register_sidebar(array(
    ‘name’=>’Featured Top Full Width’,
    ‘id’ => ‘featured-full’,
    ‘description’ => ‘This is the full width top featured section of the homepage.’,
    ‘before_title’=>’<h4 class="widgettitle">’,’after_title’=>’</h4>’
    ));
    [/php]

    Then, I replaced the contents of the home.php file with this:
    [php]
    <?php

    add_action( ‘genesis_meta’, ‘child_home_genesis_meta’ );
    /**
    * Add widget support for homepage.
    *
    */
    function child_home_genesis_meta() {

    if ( is_active_sidebar( ‘featured-full’ )) {

    add_action( ‘genesis_before_loop’, ‘child_home_loop_helper’ );

    }
    }

    /**
    * Display widget content for home featured-full section
    *
    */
    function child_home_loop_helper() {

    if ( is_active_sidebar( ‘featured-full’ )) {

    echo ‘<div id="featured-full">’;
    echo ‘<div class="featured-full">’;
    dynamic_sidebar( ‘featured-full’ );
    echo ‘</div><!– end .featured-full –>’;
    echo ‘</div><!– end #featured-full –>’;

    }

    }

    genesis();
    [/php]

    If you want to see it in action on my test site, shoot me an e-mail, and I’ll provide the link.


    Susan @ Graphically Designing I offer theme customizations I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

    #58364

    dev
    Participant
    Post count: 467

    Thanks.

    I wonder if something like this will work with Agency?

    #58380

    Susan
    Moderator
    Post count: 9406

    Dev – I haven’t looked at the home php of the Agency theme – I used Eleven40 because I had it already on my computer. If you are replacing all the widget functionality of Agency’s home page anyway, I don’t see any reason why it wouldn’t.


    Susan @ Graphically Designing I offer theme customizations I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

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

You must be logged in to reply to this topic.