Grid Loop in Site Archives

Community Forums Forums General Discussion Grid Loop in Site Archives

This topic is: resolved

This topic contains 12 replies, has 2 voices, and was last updated by  nutsandbolts 11 months, 3 weeks ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #72107

    liannef
    Member
    Post count: 39

    Hi There!

    I would love to use the grid loop for my site archives. It’s working everywhere else on the site but this page. Currently they look like this http://themakeupgirl.net/archive/

    I am using the Mocha theme

    Any help you could give would be appreciated!

    Thank you!!

    http://www.themakeupgirl.net
    #72130

    nutsandbolts
    Keymaster
    Post count: 3176

    It seems like something is up with your archives… When I try to view your category pages, I’m getting the long list like on your archive page instead of the post archives. For example, if I click on Popular Categories > Beauty News in your nav, I’m being sent to a page (http://themakeupgirl.net/beauty-news/) instead of the category archive (http://themakeupgirl.net/category/beauty-news/). If I try to visit the category archive manually, I get redirected to your homepage.


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

    #72171

    liannef
    Member
    Post count: 39

    Hey Andrea,

    I was trying something – it’s back now LOL

    #72545

    liannef
    Member
    Post count: 39

    Hey Andrea,

    Any idea how I can do the grid on that link?

    -Lianne

    #72554

    nutsandbolts
    Keymaster
    Post count: 3176

    The easiest way is the Genesis Grid Loop plugin – you can choose which pages show the grid and which ones don’t.


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

    #72557

    liannef
    Member
    Post count: 39

    Does that conflict with the grid loop code that is already in the theme?

    #72558

    nutsandbolts
    Keymaster
    Post count: 3176

    It shouldn’t, as long as you don’t select the homepage (or wherever the loop is being used by the theme) in the plugin settings.


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

    #72559

    liannef
    Member
    Post count: 39

    Okay, I have the plugin installed. But there isn’t anyplace to specify what pages only this

    Enable on:

    Blog Home Category Archives Tag Archives Author Archives Search Results

    Is there a shortcode to use it on a page?

    #72560

    nutsandbolts
    Keymaster
    Post count: 3176

    No, but if you use the automatically-generated category archives as I mentioned before (instead of creating a page manually for each category), you can check the category archives box and it will show up on all of them.


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

    #72561

    liannef
    Member
    Post count: 39

    They aren’t pages – they just have the “category” stripped via the Yoast plugin. Those are the actual categories….I just want to be able to display a grid on a page instead of this list that appears (i think I’m using the archive template) http://themakeupgirl.net/archive/

    #72562

    nutsandbolts
    Keymaster
    Post count: 3176

    Okay, in that case make a template called myarchive.php or something, stick the grid loop in it, and assign it as the template for that page.


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

    #72613

    liannef
    Member
    Post count: 39

    Hey Andrea,

    I added this code to a new .php file and uploaded it but it’s not showing in my template options for the page

    <?php
    
    remove_action( 'genesis_loop', 'genesis_do_loop' );
    add_action( 'genesis_loop', 'child_grid_loop_helper' );
    /** Add support for Genesis Grid Loop **/
    function child_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' => 30,
    			'grid_image_class' => 0,
    			'grid_content_limit' => 250,
    			'more' => __( '[Continue reading]', 'genesis' ),
    		) );
    	} else {
    		genesis_standard_loop();
    	}
    
    }
    
    genesis();
    #72632

    nutsandbolts
    Keymaster
    Post count: 3176

    You need a heading at the top (right under the opening PHP tag) to let WP know it’s a template file:

    <?php
    /*
     * Template Name: My Custom Template
     */

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

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

You must be logged in to reply to this topic.