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

  1. brunotellier
    Posted 3 years ago #

    Hi Bill,

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




  2. brunotellier
    Posted 3 years 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
    Plugin Author

    Posted 3 years 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
    Posted 3 years ago #

    Thank you Bill

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Genesis Grid
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.