Home>Support>Adding classes to ‘panel-grid’ div

Adding classes to ‘panel-grid’ div

I see that while editing a row I can add classes to a row and a cell but not the parent “panel-grid” div element.

The plugin instead appears to create a “panel-row-style” element inside of the “panel-grid” element. What I would like to do instead is just add a class to the “panel-grid” element. Is there a way to do this?

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 8 years, 29 days ago Jaume Llopis

    Hello, I guess I’m a year late on this thread but I had recently the same issue.

    I like SO pagebuilder and I miss a few features which would make it more powerful for the page style.

    I’ve been looking for filters and other ‘non hacking’ options, but was unable to find a definitive workaround.

    The code below lets me define a custom class for the requested panel-grid but isn’t update-safe, I’d like to see a feature like this on future updates if possible, instad to replace it on each plugin update.

    On file \wp-content\plugins\siteorigin-panels\siteorigin-panels.php around line 1071

    Replace this:

    $grid_classes = apply_filters( 'siteorigin_panels_row_classes', array( 'panel-grid' ), $panels_data['grids'][$gi] );
    

    For this:

    //registering siteorigin pagebuilder panel custom classes
    $default_grid_classes = !empty( $panels_data['grids'][$gi]['style']['class'] ) ?
    	array( 'panel-grid' , $panels_data['grids'][$gi]['style']['class'] ) :
            array( 'panel-grid' );
    
    //applying filters
    $grid_classes = apply_filters(
    	'siteorigin_panels_row_classes',
    	$default_grid_classes,
    	$panels_data['grids'][$gi] );
    

    Now the row type field in SO PageBuilder Editor > Edit Row is registered within the same div as panel-grid class

  2. 8 years, 28 days ago Andrew Misplon
    Hi, I Work Here

    Hi Jared

    Thanks for reaching out. We have a few filtering options documented here: https://siteorigin.com/docs/page-builder/hooks/html/. Unfortunately, beyond those examples, we aren’t able to offer much in the way of dev support on the forums at the moment. Hopefully, as we expand in the coming year we’ll be able to dive into more of these questions.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More