The Grid not displaying properly

For some reason The Grid plugin is not displaying properly for me. It works on one page but any other page I put it on it is extremely broken. Both of these pages are built identically yet there is a major issue - attached is a screenshot of the issue and the urls are http://lucidnew.lpwebdesign.net/home/grid-2/ and http://lucidnew.lpwebdesign.net/home/portfolio.

Solution found.

Hi @lp-ben,

Happy to hear that. Feel free to ask us again.

If it is okay, you can share us the solution so that if someone will check this thread it can help us.

Thanks.

I had turned off global CSS for The Grid in the global options/general options menu and that was the issue. Apparently you have to have global CSS turned on, place your grid on a page, then disable global after.

Hey,

Thanks for share your solution :slight_smile:

@lp-ben This solution does not work for me. As soon as I turn off ‘Include The Grid library globally’ - the grid display is messed up as your screen shot. Any other solution? @john

Hey @dshakya,

Thanks for updating this thread. To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

Best Regards.

Please see secure note in my previous reply. @RueNel

Hello @dshakya,

I had turned off global CSS for The Grid in the global options/general options menu and that was the issue. Apparently you have to have global CSS turned on, place your grid on a page, then disable global after.

@lp-ben have disabled the setting which has cause the issue. You need to have it turn ON.

Best Regards.

Hi @RueNel

That is the whole issue. I do not want to have the option ON so that the grid related JS and CSS files are not loaded on the pages that do not have the grid. This will help load page faster as it does not have to load additional files.

@lp-ben was there anything else you did that allowed you to turn off the global loading but still load the scripts in pages where girid was present?

Hi @lp-ben and @RueNel,

I have finally figured out why it was not loading the script when the global was turned off.

If you look at the plugin file - the-grid/frontend/the-grid-init.class.php

	/**
	* Enqueue scripts on front-end
	* @since 1.0.0
	*/
	public function enqueue_scripts($options) {
		
		global $post;
		$global_library = get_option('the_grid_global_library', true);

    	if($global_library || ($post && has_shortcode($post->post_content, 'the_grid'))) {
			$this->global_scripts();
			$this->global_styles();
		}
		
	}

The plugin is looking for 'the_grid" shortcode when the global option is OFF. But the theme uses the shortcode 'cs_the_grid’

The plugin can’t find the shortcode and hence does not enqueue the required scripts when the global load if off.

SOLUTION:

Edit the file and change the string to ‘cs_the_grid’ instead of simply 'the_grid’

My grid is now displaying correctly with the global setting turned OFF. Maybe Themeco can make some changes to how it reads this for compatibility with the plugin.

Hi Deepak,

Glad you were able to figure it out.

For information regarding the bundled version, kindly refer to the link below

Thank you.

Hi @paul.r

Thanks for replying. I have gone through this documentation and know my way around the plugin. All I am asking for now is that since this is a bundled product, it should play nice with the theme - Pro and X. It would be good if Themeco made those changes in the shortcode before releasing the bundle. The whole point of bundled software is that it ensures compatibility with the theme.

Thanks for taking time to answer my query.

Hi @dshakya,

It’s compatible, but the global option isn’t consistent at all and it’s due to the grid itself, sometimes toggling off the global fixes, but sometimes it’s the contrary.

And cs_the_grid is a builder’s shortcode as a wrapper for the_grid to make sure it’s integrated as builder element. But, it’s nothing to do with the global option of the grid.

The downside of doing that is, it will permanently look for cs_the_grid from the content, and the_grid will be ignored and the most affected are the shortcodes added outside the builder.

But thanks for sharing your solution, and we’ll take note of that and maybe we could forward it to the grid’s developer.

Thanks!

Thanks @Rad for responding to this one.

Since I only use the Grid from the builder / Cornerstone, it should be fine for me. Haven’t had any side effects yet but this definitely needs to be looked into. Users would not like that the Grid codes are loaded on all pages even when the grid is not present.

Thanks again!

You’re welcome! :slight_smile: