Prior to Thesis 1.6, the grand dame of WordPress themes — yes, we mean Thesis 1.5 and earlier, do try to keep up — required the use of either FTP, your server host Control Panel (CP), or tack-on plugins such as Thesis OpenHook, a third-hand device the herd never took a shine to, for reasons you may ask of the blind cat.
If she were here. Plugins — like cats — have a special way of disappearing. Most especially when you see a chubby family of mice frisking in your corn ration. Worthless, all of them. To deal with vulgar demands, Thesis 1.6 brought the Custom File Editor, which the mules cackled to see, for the herd knew you would make a hash of it.
In particular the PHP editing. And so you have!
Because if you are here, you have already destroyed your Thesis site. WordPress no longer lets you in as admin, as well it should not. And you believe the Mules will assist you. Perhaps we shall. But we’ll laugh throughout, you silly gits… long and loud.
For those of you with a shard of sense, here it is, then, let’s fix your parse error straightaway…
1. Open FTP, locate custom_functions.php, revert to backup.
Oh yes, an FTP program will be needed. The Custom File Editor in Thesis 1.6 allows direct, live editing of the PHP functions in a file cleverly named… custom_functions.php… dear Mr. Pearson was taken with fever whilst naming that special child. And once you’ve ruined your custom PHP file, you’ll enjoy a brisk FTP exercise.
Honestly, an in-dash PHP editor?
Easy to edit… easy to break! Custom functions! PHP! Pour your last nightcap and take it right on! For that is what you have done, probably distracted by your favorite recollections of Australian karaoke.
PHP // It’s dynamite (oi oi oi)
PHP // I’ll try it tonight (oi oi oi)
PHP // Feel the server load (oi oi oi)
PHP // Watch it explode…
– AC/DC (as Mules hear such noise)
Had to flick the tiger’s tail, didn’t you?
No warning signs. No manuals. Not a snip about PHP was to be found in online tutorials. Why… it’s hardly your fault that PHP doesn’t speak the King’s!
No doubt you have blamed everyone but yourself… tigers should not have tails, the cage was open… PHP is hard… the editor edited itself. Tell yourself all the usual rot, and when you’re ready to assign blame to yourself, read on — just for you, the mules will be patient. We’ll read a PHP book and nibble sprigs of ditch weed, meantimes.
Are you feeling very much to blame for your blasphemy of PHP? Oh good.
We’ll repeat that first bob: here’s the short version, for those of you trembling to get back on FriendFeed and FourSquare. It won’t do to fix this custom functions PHP file… not if your DailyBooth hasn’t been updated!
1. FTP to /custom/custom_functions.php. Upload your backup PHP file.
But I’m a PHP foal, you cry… oh please, clutch at my fleshy, star-shaped hand… haaaalp!
Very well. Our assumptions include, but are not limited to… you haven’t a clue what you’re doing, you broke your Thesis custom PHP file, it’s doubtful you have a backup of any kind, you feel FTP stands for Foal Training Programme… and now a superior species must come to your aid.
Why mules? Where are the dolphins? Where the pigs?
[We know the answer to this second question, the wild-eyed sow is twitching in her sleep and doing what pigs do best when they've overindulged on a crib of rotted turnips. Small wonder they're in with humans for intelligence.]
Our daily yoke squeaks of sweet liberty compared to hearing your whimpering.
Right, right then — here is the herd’s misanthropic visual guide to correcting the PHP syntax errors you code-pasting bipeds have plastered all about your custom_functions.php file in the Thesis theme custom folder, resulting in a white site, parse errors, admin lockout, and many a fresh entry for the urban dictionary.
Let’s rewind a notch, shall we?
You were feeling of oats and sucking first tea, thinking yourself right smart, for a human.
And you were here:
And you made a horse-sized PHP syntax error. Or your cats had a tussle on the desk. The green BASB save button called you by name… and you panicked. Your server choked because you went cheap on hosting. Goodness knows what you did.
But hitting the save button created a white screen for philosophers to ponder, or perhaps a PHP parse error such as this one:
Don’t bother yourself hitting the back button. It will tempt you, but it won’t work. You have killed your site, your WordPress admin no longer likes you, and you want to cry. This is where you will also realize you never made that backup of custom_functions.php — oh you meant well enough, but you never did. Curses.
It’s time to roll out your favorite FTP client… FireZilla is a free one. The herd doubts you have a proper FTP client, tight-fisted sort that you are. If you have a program such as CuteFTP or Transmit, you may have a carrot… good human!
We’ll presume — correctly — that you haven’t a clue what to do with FTP. Or your Control Panel, which is an even better way to learn to hate cheap server hosting. Connect to your site.
Navigate your way with clicks through the following path, which the herd has made into a series of screen captures below for those of you with reading comprehension issues…
Get to your main web folder in FTP and follow this bright yellow path, Dorothy:
For the text-challenged biped, time for the eye candies.
Open your FTP client and connect to your server host. If you do not know how to do this, find the email your host initially sent, taunting your poor choice, and information to connect via FTP should be included. FTP login credentials are usually also available within your host’s Control Panel (CP). If your host does not offer an FTP connection, find a new host.
Heavens to Betsy! You clicked a button to Connect to your server with FTP. Exhausting. Cupcake time. Crumpets, you can call them, for they are lower in calories so named. Have three.
Next you’ll double click your way to the /custom folder. It will take a few clicks. Remember to stretch first… and don’t blame us for your failed evolution — those with hooves may continue at higher speeds.
Note the above may vary by server host. The first folder may be /public, /public_html, /www, /htdocs, /wordpress — guess if you must… but back up and try again if the next screen does not look as so… for it is into the heart of wp-content we must travel.
Inside /wp-content are your installed themes. Need we say more? Probably so. Click click!
And in /themes is Thesis. If not, you’ve done more wrong than even the herd suspected. If you have more than one version installed, click the one you use. For the moment, the latest release is /thesis_16.
Inside /thesis_16 is your /custom folder. It was originally named /custom-samples, but to create a PHP disaster as you have done, you’ve managed to rename this folder /custom at some point, likely when you were deep in your cups.
Oh-em-gee! It’s your custom_functions.php file! And all your backups. Except you surely have no backups. Give yourself a crunchy apple if you see backups here. We rather thought not.
So then, quite the journey! Several clicks. Your gaudy parlor clock has chimed the hour at least twice we’re sure. And you haven’t even done anything worth mentioning yet. Take tea. Use your laser pointer to torture a cat you’ve dressed in a cardigan and named something you thought clever (you were wrong).
Then continue, because now we’ll lead you through the next steps you will fail utterly calf simple part that fixes your PHP custom function Thesis folly.
If you’ve made no valuable changes to your custom PHP functions, you can drag over the original custom_functions.php from the Thesis.zip installation package and start afresh. Some of you will have stolen enough code to want to salvage what you can. If you have a backup, lovely, use it.
But first, rename the “parse error edition” to something you can fix later, should you have the urge, this being the MULE_FAIL as shown below.
Naturally, no mule would make such an error as you have, not in PHP and not in other life choices. But we shall pretend for your benefit that a tribe of rabid lambs trampled our input devices, and we must assume your mental state of paralyzing fear and a deep self-loathing.
The herd has renamed the broken file, and we now drag over a functional file. In our circumstance, we drag across a recent backup. In your case, it will be a backup… allow us a round of braying… or the original Thesis custom functions file — the one you get with the zipped installation packet.
For the truly desperate, you may make your own custom_functions.php file in five oily taps, one for each of your chocolate-smeared fingers… open a simple text editor such as NotePad or TextEdit, and type but this — no spaces, no carriage returns:
Save this mighty testament to your code prowess as… custom_functions.php. To your desktop area. You’ll have a working PHP file to restore. You are gifted indeed!
So, should you have local or server-side backups, jolly good. Rename the existing file should you wish to fix it later, upload the backup or original or our “five taps and save” edition restore and revert — copy it to your live server — the file as shown below. Drag. Drop. Done.
At this point in time, your WordPress installation… not to its credit as an instrument of any intelligence… deems you once more fit to administer a Thesis themed site.
And there you have it, a double thousand words you won’t read, with a number of lovely images you won’t understand. The herd has seen your primitive art. Sad, really.
Yet if you follow these steps, you may just find yourself learning how to fix parse errors and other PHP syntax catastrophes. We’ve implied how you can make backups of your existing Thesis custom_functions.php file both local and remote.
You may now proceed to insert additional pasted-in functions nicked online… and you can break your site all over again.
As for us, it’s time the herd kick the blanket-warming poultry and felines from their temporary roosts in our stalls. Unlike humans, honest work awaits mules, come first light.