Skip to content

Instantly share code, notes, and snippets.

@AlexGStapleton
Last active November 16, 2021 17:07
Show Gist options
  • Save AlexGStapleton/2c4210cd765cec5329cf5a7c07ae8179 to your computer and use it in GitHub Desktop.
Save AlexGStapleton/2c4210cd765cec5329cf5a7c07ae8179 to your computer and use it in GitHub Desktop.
SiteOrigin Page Builder: Output Row Class Containing Cell Count If More Than One Cell
add_filter( 'siteorigin_panels_row_classes', function( $row_classes, $row ) {
if ( ! empty( $row['cells'] ) && count( $row['cells'] ) > 1) {
$row_classes[] = 'panel-row-cells-' . count( $row['cells'] );
}
return $row_classes;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment