Last active
January 22, 2018 03:19
-
-
Save ScottAgirs/92dfeeedd818c81311a4e6867e0120e8 to your computer and use it in GitHub Desktop.
Add Wraps to WP Genesis Framework elements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author (Scott) Agirs Neminskis | |
* @contact [email protected] | |
*/ | |
// 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