Created
March 29, 2024 13:42
-
-
Save plugin-republic/569798ec81f33be7a6cb183e9558d271 to your computer and use it in GitHub Desktop.
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
<?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