Skip to content

Instantly share code, notes, and snippets.

@ScottAgirs
Last active January 22, 2018 03:19
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 ScottAgirs/92dfeeedd818c81311a4e6867e0120e8 to your computer and use it in GitHub Desktop.
Save ScottAgirs/92dfeeedd818c81311a4e6867e0120e8 to your computer and use it in GitHub Desktop.
Add Wraps to WP Genesis Framework elements
/**
* @author (Scott) Agirs Neminskis
* @contact scott.a@twosquarepixels.com
*/
// Wrap Genesis Post Loops in an additional element ( div, p, a, or any other )
add_action ( 'genesis_before_loop', 'an_extra_loop_wrapper_open' );
add_action ( 'genesis_after_loop', 'an_extra_loop_wrapper_close' );
function an_extra_loop_wrapper_open() {
echo '<div class="additional-wrap">';
}
function an_extra_loop_wrapper_close() {
echo '</div> <!-- end .additional-wrap -->';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment