Skip to content

Instantly share code, notes, and snippets.

@reasonstousegenesis
Created November 16, 2015 04:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reasonstousegenesis/f05af51a7afa646b7391 to your computer and use it in GitHub Desktop.
Save reasonstousegenesis/f05af51a7afa646b7391 to your computer and use it in GitHub Desktop.
Only prevent the first post in each loop from appearing more than once
<?php
// Paste the code BELOW this line into your child theme functions.
/**
* Only prevent the first post in each loop from appearing more than once
*
* @author Reasons to Use Genesis
* @link http://reasonstousegenesis.com/genesis-global-exclude/
*/
remove_action( 'genesis_after_entry', 'genesis_add_id_to_global_exclude' );
add_action( 'genesis_before_loop', 'genesis_add_id_to_global_exclude' );
<?php
// Paste the code BELOW this line into your child theme functions.
/**
* Only prevent the first post in each loop from appearing more than once (XHTML)
*
* @author Reasons to Use Genesis
* @link http://reasonstousegenesis.com/genesis-global-exclude/
*/
remove_action( 'genesis_after_post', 'genesis_add_id_to_global_exclude' );
add_action( 'genesis_before_loop', 'genesis_add_id_to_global_exclude' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment