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)
-   -   Method Question to avoid losing tweaks on upgrade (http://forum.bytesforall.com/showthread.php?t=21956)

Michael4fm Apr 2, 2014 03:40 AM

Method Question to avoid losing tweaks on upgrade
 
Just upgraded to v 1.2.2 - generally very smooth as usual ... many thanks. A couple of questions / minor issues though:

1) I use Montezuma with a child theme. I know it wasn't really designed to need to be used that way, but historical necessities led me down that path. Certain files don't seem to register as being available in the child theme - e.g. breadcrumbs.php and comment-form.php. Even though my versions exists in the child theme, in the equivalent locations, it uses instead the main Montezuma ones. It's therefore necessary for me to recopy my versions of these files into the main Montezuma directory after upgrade. I suspect I shouldn't really be doing this! Am I doing something wrong (other than the copying!)? Perhaps putting them in the wrong place?

2) Any changes I make to the base CSS files in the child theme also don't register, and obviously those in the main Montezuma theme directory get overwritten on upgrade. I doubt this is really an issue, as the CSS actually used is held internally in the database. I do all of my work offline on a development site, then upload a revised database. I guess it would only become an issue were the RESET ALL option invoked on the live site. I mention it mainly in case I'm wrong and missing something, and should be more worried about reinstalling my versions than I actually am.

3) I've tweaked some of the functions. Because the functions in the main Montezuma functions.php file aren't wrapped in an if(!function_exists) conditional clause, I can't just redefine those functions in a separate functions.php file in the child folder, without getting "function already exists" error messages. At the moment I'm just recopying the old (tweaked) version of the functions file back into the main Montezuma directory. I suspect this is a worse crime than the others, because any new functions introduced in the upgrade won't get defined. It occurs to me, while writing, that a partial workaround is to create a child functions.php file only containing / redefining the functions I've changed, then either delete or wrap in an if...exists clause those functions one at a time in the upgraded Montezuma functions.php file. Is there a better way I'm missing (by 'better', I mean 'less work' to be honest!)?

Like I said at the start the basic upgrade worked well, and as theme upgrades are so rarely needed, this is only a minor issue and I appreciate it's compounded by me not using the theme exactly as intended. Therefore if the answer is 'go away and stop annoying me!' I'll understand. :)

I'm just too anal to resist once the 'Upgrade available' bubble comes up! :o

(Site is http://s-t-u-f-f.net but as - hopefully - I've caught all the tweak issues, viewing it probably wouldn't help!)

juggledad Apr 2, 2014 08:48 AM

Your right, Montezuma isn't like other themes (some might say it's better) going the child theme route and you are exploring new territory

Quote:

I do all of my work offline on a development site, then upload a revised database.
Why don't you just do an export import? (dashboard->appearances->MTO->Export Import)

Quote:

...Is there a better way I'm missing (by 'better', I mean 'less work' to be honest!)?
not at the moment.:o

Michael4fm Apr 3, 2014 01:50 AM

Quote:

Originally Posted by juggledad (Post 107832)
... some might say it's better

That would include me :)

Quote:

Originally Posted by juggledad (Post 107832)
... going the child theme route and you are exploring new territory

Oh goody, always fancied being an explorer.

For anyone else who might read this and be at the start of their learning journey, I probably wouldn't now go this route if I was starting from scratch. It actually works well like that with just a little bit of work - on upgrades etc. - but it would probably have been better to spend a little longer understanding how the theme works and then making it do what I needed within 'the rules'.

Quote:

Originally Posted by juggledad (Post 107832)
Why don't you just do an export import? (dashboard->appearances->MTO->Export Import)

I meant changes to the database info - new posts, new relationships, etc. - rather than just changes to the theme ... though now you've suggested it, I have a strange desire to try it! :p That may well be a better way to ensure all my online Montezuma files match my offline ones.

Still think it's the best theme out there ... though of course I did mostly stop looking once I'd found it! ;)


All times are GMT -6. The time now is 11:43 AM.

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