WordPress.org

Ready to get started?Download WordPress

Forums

Genesis Grid
[resolved] Exclude categories from Grid Loop (4 posts)

  1. brunotellier
    Member
    Posted 1 year ago #

    Hi Bill,

    It's possible to exclude a category from the Genesis grid,I want some categories display normally on Category Blog Page.

    Thanks

    Bruno

    http://wordpress.org/extend/plugins/genesis-grid-loop/

  2. brunotellier
    Member
    Posted 1 year ago #

    Hi Bill,

    I play in the code and I find a way to do what I want.

    ( $query->is_category('category id') && genesis_get_option( 'grid_on_category', 'genesis-grid' ) )

  3. Bill Erickson
    Member
    Plugin Author

    Posted 1 year ago #

    There's a filter called genesis_grid_loop_section which gives you fine-grained control over where the grid loop is used.

    Example: http://www.billerickson.net/code/limit-genesis-grid-to-specific-category/

    First you pull out the line you want to control (in this case, the category line). Then you create an if statement inside it for your specifics. In this example I'm excluding the grid loop from one specific category. You could do the reverse by setting it to 'true' if on a specific category and 'false' for anything else.

    This code goes in your theme's functions.php file. The benefit to this approach is that, when I update the plugin, you won't lose your changes.

  4. brunotellier
    Member
    Posted 1 year ago #

    Thank you Bill

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.