pixelgrade / gridable

The Missing WordPress Grid Content Editor
GNU General Public License v3.0
9 stars 2 forks source link

Attributes outputs nothing on the front end #54

Closed VladNov closed 7 years ago

VladNov commented 7 years ago

Awesome plugin man!

I've tried the attributes feature, but had two issue:

1. Column - with the "select" field type output select2 related JS error and does not open the modal window. Works great without the "select" field.

2. Rows - does not output any of the attributes on the front end. Bg color is visible in the editor, but not on the front end.

andreilupu commented 7 years ago

Hi, thanks for the kind words!

The js error

Gridable builds the select fields with the Select2 library and we include the latest version 4.0.3. The problem here is that some plugins include the old version 3.8 and between these two versions some breaking changes has been made. For example, WooCoomerce will update this library in the next update. I will try to find a solution for this, but right now you will have to disable the plugins who load an older version of select2.

Attributes output in front-end

The gist example with the attributes is meant to show you how to add attributes in the attributes modal. But it doesn't add style in front-end for you(theoretically, it shouldn't because this is the theme's job). Only the theme can decide where that color should be or not. But this is good because Gridable has enough filters and lets you play in your theme like so:

You can also do this for columns with the gridable_column_attributes filter.

We've chosen this way because we think that WordPress themes should have the ultimate control over the layout, not the plugins. A plugin should offer the way, but a theme should decide how it looks.

Thanks again for helping us in making Gridable better!