Changing variable names in a theme
-
I’m managing a video blog site, and am trying to switch themes from the one we’ve been using to a new one we purchased. Most of the transition is going smoothly, but the variable in which the video embed code is stored has a different name in each theme (tj_video_embed vs wpzoom_post_embed_code), so the theme designers told me I’d need to go back and re-paste the embed code for each video.
To add to the fun, the new theme expects thumbnails to be stored locally, and the old one was fine using remote images. I’m sure it’s possible to point the new one to the existing urls (rather than re-upload all the thumbnails), I just can’t quite figure out how…
Rather than go through and re-enter all the embed code (and the link to the thumbnails, and any other stuff like that), I’d rather go through the new theme’s code (and/or the database itself, which I’m also willing to do, but the code seems like a better idea) and change the variable names that it’s looking for so they match what we have data for.
However, it seems like this could go horribly wrong, either now or at the next update of the theme. (For context, I’m not really a coder (I can generally figure out what code is doing, and repurpose existing code to my ends, but do not easily generate new code, and am always worried that I’m missing some detail/file/whatever that I don’t know about).)
What would you recommend I do to make this transition smooth?
Thank you thank you thank you.
The topic ‘Changing variable names in a theme’ is closed to new replies.