Home>Support>Remove panel-grid and panel-grid-cell classes using a filter

Remove panel-grid and panel-grid-cell classes using a filter

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

I’m creating some widgets based on the Extend Widget Bundle and am looking for a way to remove some classes from the grid html output without modifying the siteorigin-panels plugin code. My goal is to replace the Panels grid system with one I’m currently helping develop.

The classes I’d like to remove are ‘panel-grid’ and ‘panel-grid-cell’.

So far I’ve been able to add options fields to rows using custom_row_style_fields that lets users select a pre-defined layout. The classes for the custom grid are then added using the siteorigin_panels_row_cell_classes filter.

I’m unsure how to remove the ‘panel-grid’ class at this point.

Is this possible using filters? I’ve seen several questions around similar issues on the support forum but haven’t figured this out yet. :)

Thanks for creating and sharing all of your helpful plugins!

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

  1. 9 years, 3 months ago Alex S
    Hi, I Work Here

    Hi Matthew,

    The hooks you’re looking for are siteorigin_panels_row_classes and siteorigin_panels_row_cell_classes.

    For reference, here’s the exact lines, both found in this file. Here’s the lines:

    siteorigin_panels_row_classes

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

    siteorigin_panels_row_cell_classes

    $cell_classes = apply_filters( 'siteorigin_panels_row_cell_classes', array('panel-grid-cell'), $panels_data );

    Links are current as of posting, can’t promise they will be in the future however so I’ve included the exact line contents for reference also.

  2. 9 years, 3 months ago Private Message - Matthew Gross

    This is a private message.

  3. 9 years, 3 months ago Private Message - Alex S Hi, I Work Here

    This is a private message.

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