• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Add Column Classes To Genesis Custom Loop

The code in this tutorial creates a custom loop which enables you to use any WP_Query parameters. On top of this, it enables you to include Bootstrap column classes so you can display any post type entries in columns.

genesis-custom-loop-with-column-classes

You can also remove default functions attached to a specific action hook from the standard loop enabling you to customize the output of each entry in your custom loop.

To remove standard functions from each entry, simply add any remove_action hooks to line 25 in the template code.

Some examples of standard functions you can remove from each entry in your custom loop:

//* Remove the post info function
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );

//* Remove the post image (requires HTML5 theme support)
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );

//* Remove the entry title (requires HTML5 theme support)
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    
//* Remove the post meta function
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );

The template also includes pagination.

Template Installation

  1. Create a new file named genesis-custom-loop.php in your child themes root directory and add the template code below.
  2. Select the template named Columns Loop from the Template drop down menu in the Page Attributes meta box on the Edit Page screen.
  3. Adjust the column classes to your own requirements.

Here’s the template for logged in members:

Register for full access

Related Tutorials

  • Add Genesis Column Classes In foreach Loop

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems