Craftiness Theme – Static homepage

Community Forums Forums General Discussion Craftiness Theme – Static homepage

This topic is: resolved

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

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #34742

    vanhovland
    Participant
    Post count: 10

    Hi all,

    I am working with the Craftiness Theme and I want to place a slider on the homepage, using a static page. It works great if I leave it as a non-static page using the Genesis Slider.

    Do I need to change the function.php if there is already the following widget?
    /** Register widget areas */
    genesis_register_sidebar( array(
    ‘id’            => ‘featured’,
    ‘name’            => __( ‘Featured’, ‘craftiness’ ),
    ‘description’    => __( ‘This is the featured section.’, ‘craftiness’ ),
    ) );

    What do I need to do with the home.php to make it work?
    remove_action( ‘genesis_loop’, ‘genesis_do_loop’ );
    add_action( ‘genesis_loop’, ‘craftiness_grid_loop_helper’ );
    /** Add support for Genesis Grid Loop */
    function craftiness_grid_loop_helper() {
    if ( function_exists( ‘genesis_grid_loop’ ) ) {
    genesis_grid_loop( array(
    ‘features’ => 2,
    ‘feature_image_size’ => ‘featured’,
    ‘feature_image_class’ => ‘alignleft post-image’,
    ‘feature_content_limit’ => 500,
    ‘grid_image_size’ => ‘thumbnails’,
    ‘grid_image_class’ => ‘alignleft post-image’,
    ‘grid_content_limit’ => 0,
    ‘more’ => __( ‘[Continue reading...]‘, ‘genesis’ ),
    ‘posts_per_page’ => 10,
    ‘offset’ => 0,
    ) );
    } else {
    genesis_standard_loop();
    }
    }

    /** Add homepage widget area above posts */
    add_action( ‘genesis_before_loop’, ‘craftiness_homepage’, 9 );
    function craftiness_homepage() {
    if ( is_home() ) {
    dynamic_sidebar(‘Homepage’);
    }
    }

    /** Add featured widget area above posts */
    add_action( ‘genesis_before_loop’, ‘craftiness_before_post’, 9 );
    function craftiness_before_post() {
    echo ‘<div class=”featured”>’;
    dynamic_sidebar(‘featured’);
    echo ‘</div>’;
    }

    genesis();

    Thanks!

    Heidi

    #34743

    vanhovland
    Participant
    Post count: 10

    Sorry my site url is: http://96.127.180.186/~mvmontes/

    Heidi

    #34753

    braddalton
    Participant
    Post count: 8780

    There’s different ways to do this depending on:

    1. The location you want the slider displayed on your home page
    2. And which slider plugin you want to use.

    Firstly, choose the hook location using this visual guide and then add that hook to the code using one of two methods.

    1. You can then add the code to your child themes functions.php file

    http://www.studiopress.com/forums/topic/header-slideshow/#post-34746

    2. Or use another code snippet in one of the Genesis Simple Hooks fields.

    3. Or you can create a widget area for the slider if you want to use the Genesis Slider.

    Please let me know exactly what you want and i’ll provide the code.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #34754

    vanhovland
    Participant
    Post count: 10

    Brad,

    Thanks for responding. There already is a ‘featured’ widget (so I don’t think I need to crate a new one). I have put the Genesis Responsive Slider in there, and it works if I select your latest posts under the Theme’s options.

    I did try emailing to the site’s developer and got this back: “To have the slider work with a static page, you would need to create a “widget” area on the static page, which would mean customizing both your PHP theme file, and your CSS file. Brian Gardner, creator of StudioPress, has a couple of tutorials on his blog about how to accomplish this, if you are interested in doing it, as does “Nick the Geek”, another StudioPress employee.”

    I tried to find the tutorials mentioned by doing a search, but did not find them.

    I guess I would like to create the widget area, I think that would give me the most flexibility.

    Thank you so much for your help!

    Heidi

    #34761

    braddalton
    Participant
    Post count: 8780

    You’ll need to create a widget area for the static home page.

    What location?

    Before the header
    In the header
    After the header

    Choose from these hooks and i’ll give you the code.

    You could try this code and change the hook location:

    https://gist.github.com/5285591.git


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #34804

    vanhovland
    Participant
    Post count: 10

    Brad,

    I want it after the header. If I am understanding the hooks correctly,  my guess would be: genesis_before_content.

    Thanks!

    #34870

    braddalton
    Participant
    Post count: 8780

    Any of these:
    [php]
    genesis_after_header
    genesis_before_content_sidebar_wrap
    genesis_before_content
    [/php]

    Add this code to the end of your child themes functions.php file

    Change the hook if you want it after the nav menu. Use one of the above 3 hooks if you want it full width.

    Code not displaying? Try here https://gist.github.com/braddalton/5285591


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #34990

    vanhovland
    Participant
    Post count: 10

    Thank you!! I now understand and it is working :) :).

    Thanks again for all your help!

    Heidi

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

The topic ‘Craftiness Theme – Static homepage’ is closed to new replies.