• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Grid Loop in Site Archives

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Grid Loop in Site Archives

This topic is: resolved

Tagged: archive, grid loop, Mocha

  • This topic has 12 replies, 2 voices, and was last updated 9 years, 2 months ago by nutsandbolts.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • November 10, 2013 at 2:31 pm #72107
    liannef
    Member

    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
    November 10, 2013 at 4:26 pm #72130
    nutsandbolts
    Member

    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/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    November 10, 2013 at 5:49 pm #72171
    liannef
    Member

    Hey Andrea,

    I was trying something - it's back now LOL

    November 12, 2013 at 2:08 pm #72545
    liannef
    Member

    Hey Andrea,

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

    -Lianne

    November 12, 2013 at 2:29 pm #72554
    nutsandbolts
    Member

    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/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    November 12, 2013 at 2:44 pm #72557
    liannef
    Member

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

    November 12, 2013 at 2:45 pm #72558
    nutsandbolts
    Member

    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/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    November 12, 2013 at 2:50 pm #72559
    liannef
    Member

    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?

    November 12, 2013 at 2:51 pm #72560
    nutsandbolts
    Member

    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/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    November 12, 2013 at 3:09 pm #72561
    liannef
    Member

    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/

    November 12, 2013 at 3:10 pm #72562
    nutsandbolts
    Member

    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/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    November 12, 2013 at 9:28 pm #72613
    liannef
    Member

    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();
    November 12, 2013 at 10:49 pm #72632
    nutsandbolts
    Member

    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/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

  • Author
    Posts
Viewing 13 posts - 1 through 13 (of 13 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble