Change home page grid layout.. Quattro Theme

Community Forums Forums General Discussion Change home page grid layout.. Quattro Theme

This topic is: not resolved

Tagged: ,

This topic contains 5 replies, has 5 voices, and was last updated by  SoZo 1 year, 7 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12032

    David Browne
    Participant
    Post count: 167

    I was just wanting to edit the home.php to make it so the posts would be in a grid view and there would be six visible posts. The home.php file seems fairly straight forward, even though I have never edited a php before, but there are not many lines of code in it.

    The code is just..

    <?php

    remove_action( ‘genesis_loop’, ‘genesis_do_loop’ );
    add_action( ‘genesis_loop’, ‘quattro_grid_loop_helper’ );
    /** Add support for Genesis Grid Loop */
    function quattro_grid_loop_helper() {

    if ( function_exists( ‘genesis_grid_loop’ ) ) {
    genesis_grid_loop( array(
    ‘features’ => 0,
    ‘feature_image_size’ => 0,
    ‘feature_image_class’ => ‘alignleft post-image’,
    ‘feature_content_limit’ => 0,
    ‘grid_image_size’ => ‘grid-thumbnail’,
    ‘grid_image_class’ => ‘alignnone’,
    ‘grid_content_limit’ => 200,
    ‘more’ => __( ‘[Continue reading]‘, ‘genesis’ ),
    ‘posts_per_page’ => 2,
    ) );
    } else {
    genesis_standard_loop();
    }

    }

    genesis();

    The problem is, I want only six posts to appear to the home page. No matter what figure I change the “‘posts_per_page’ =>” it remains as showing 10 posts. Anybody know what could be causing it?

    Also a second question.. how would i change the layout of the home page as it is not actually a page. It is stuck with two sidebars either side and i only wanted one sidebar. The options in genesis dont apply to the home page.


    We are Dave & Erin. Full time travellers and designers. Currently in Sydney. Follow us on Google +. I’m new to twitter so be the first to say hey Twitter

    Note: Known to give only give negative critique on design. I don’t mean to offend anybody, it is just more efficient pointing out mistakes than saying “yes, its beautiful” every time. :)

    • This topic was modified 1 year, 8 months ago by  David Browne.
    • This topic was modified 1 year, 8 months ago by  David Browne.
    #12033

    David Browne
    Participant
    Post count: 167

    sorry..

    url is nomadspirit.net if it helps any.


    We are Dave & Erin. Full time travellers and designers. Currently in Sydney. Follow us on Google +. I’m new to twitter so be the first to say hey Twitter

    Note: Known to give only give negative critique on design. I don’t mean to offend anybody, it is just more efficient pointing out mistakes than saying “yes, its beautiful” every time. :)

    #12109

    varickdesign
    Participant
    Post count: 11

    What version of Genesis are you using?

    #12114

    Jen Baumann
    Keymaster
    Post count: 325

    Please add this to your functions.php file

    [php]add_action( ‘pre_get_posts’, ‘child_change_home_query’ );
    function child_change_home_query( $query ) {
    if( $query->is_main_query() && $query->is_home() ) {
    $query->set( ‘posts_per_page’, ’2′ );
    }
    }[/php]

    That should be && $query. The code isn’t posting right.


    If you need technical support for your theme please file a ticket.

    The forums are community based. Staff only monitors the forum for issues relating to the forum itself and to redirect users to where they need to go.

    #17170

    ALotofLoves
    Participant
    Post count: 2

    I’m having the same issue and when I try to enter the above code into functions.php I get an error. I don’t understand the correction…can I have the correct code? I’d really like to fix this.

    Current installation here: http://cursivedesigns.com/cursivedesigns/

    #17178

    SoZo
    Moderator
    Post count: 1573

    The board screwed up the code. Change the special characters to && . Otherwise the code is correct.


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

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

You must be logged in to reply to this topic.