Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   How to (safely) change the grid (http://forum.bytesforall.com/showthread.php?t=23244)

flyboy Jul 14, 2015 08:46 PM

How to (safely) change the grid
 
I'm building a Montezuma site, but the fixed-width grids available are a tad narrow, so I changed the width to 1200px by successfully hacking the css file in /wp-content/themes/montezuma/admin/default-templates/css/grids.

However, upon updating the theme, that stuff will inevitably get overwritten. So I came up with a brilliant idea to move the grids outside the Montezuma directory and do a good-old 301 redirect on a server level using an .htaccess file.

Brilliant if it worked, that is. I tried it, and nothing happened - the theme continued observing the CSS grids in their native location.

Anyone have any ideas how I may be able to move the grids while maintaining the updatability of Montezuma?

As in, move the grids directory and force the theme to look for it elsewhere without modifying anything within the theme directory itself?

juggledad Jul 15, 2015 07:03 PM

I took a quick look thru the code and don't know thaqt there is an easy answer. At first glance, it looks like it would have to envolve a change of the code.

flyboy Jul 22, 2015 08:03 PM

Well, after some thinking I finally found a solution. I can now create a 100% custom grid and now worry about it going up in smoke on update.

The trick is to paste any grid mods into the Montezuma Options > CSS Files > clearfix.css window, at the very end.

With Montezuma, when saving the settings and/or upgrading the theme, all various CSS files get exported and compiled into into one called style.css. This file is the only css file that gets loaded in a browser, and it includes any chosen grid css files. I'm guessing that was done to speed the loading of the pages up and reduce the calls to multiple css files.

Well, the clearfix.css file gets compiled into style.css at the very end. So, by pasting any grid file modifications to the end of the clearfix.css, you are assured to have any modifications load into a browser at the end - after the original grid. Which over-rides the grid that ships with Montezuma.

Best part - these settings are exportable (disclaimer - I haven't tried exporting and importing yet, but since Montezuma exports the said clearfix.css, I would be very surprised if anyone had any problems with that)


All times are GMT -6. The time now is 12:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.