This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Adding classes to ‘panel-grid’ div

10 years ago · Last reply by Andrew Misplon 9 years ago

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.

Need fast email support? Get SiteOrigin Premium

Replies

2
  1. Jaume Llopis 9 years, 5 months ago

    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. Andrew Misplon Staff 9 years, 5 months ago

    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.

Have a different question or issue?

Start New Thread