Skip to content

Instantly share code, notes, and snippets.

@plugin-republic
Created March 29, 2024 13:42
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 plugin-republic/569798ec81f33be7a6cb183e9558d271 to your computer and use it in GitHub Desktop.
Save plugin-republic/569798ec81f33be7a6cb183e9558d271 to your computer and use it in GitHub Desktop.
<?php
/**
* Open a new div to wrap multiple groups
* Ensure you update the group ID
*/
function prefix_open_group_wrapper( $group_id, $group, $group_index ) {
if( $group_id == 455 ) {
echo '<div class="my-group-wrapper">';
}
}
add_action( 'pewc_start_group', 'prefix_open_group_wrapper', 10, 3 );
/**
* Close the div
* Ensure you update the group ID
*/
function prefix_close_group_wrapper( $group_id, $group, $group_index ) {
if( $group_id == 457 ) {
echo '</div><!-- close my-group-wrapper -->';
}
}
add_action( 'pewc_end_group', 'prefix_close_group_wrapper', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment