How Did WordPress Child Theme Save My Day

PoetsGig WordPressBlogging Tips

I have tasted the power of child theme and it was pretty awesome. It saved my day after my blog widgets got messed up for unknown reason.

While working on a forum page, I tried to create a new sidebar for the forum and member’s profile, and I thought everything went well. In fact, I saw the newly created widgets in the Appearance > Widgets, and I was already doing the styling in CSS, but poof! Suddenly, the pages are showing only on half of the screen.

Removing the CSS changes did not help. I reverted the PHP configurations of my child theme (functions, sidebar, footer) to no avail.

What have gone wrong. It was not certainly a plugin error. There was no PHP error popping up on the screen. Neither there was a problem with the CSS styles.

But, I tell you. If you do your changes on a child theme (and I assume you know what you are doing and are aware of the changes made). You could make your site online again without breaking a sweat.

Yes, child theme is a savior.

Thanks to the WordPress moderator who reminded me, not to edit the parent theme’s files directly. The main reason they tell you is that, when your theme is updated to the recent version, any changes you made to the theme files will be overwritten. Your efforts building your blogs for days could potentially gone to waste (unless, you have a regular backup, of course).



WHAT I DID TO GET MY WEBSITE WORKING AGAIN
I was confident I restored the configuration completely. So, I created a new child theme directory in wp-content/themes, with all  files copied from the original “child theme” folder. I started with the two basic files–style.css and functions.php, and after that I copied other php files I worked on, including the ones customized for BuddyPress. I did a Live Preview and yay, the site is working normal again.

That’s the good thing about using child theme. Other than that, since you have few files under a child theme folder, isolating what files have mistakenly changed is easier.

Just few days back, I kept on delaying to create a child theme, because every time I attempted, I had some PHP errors.  Little did I know, I was doing it wrong.  Probably exhausted by different ideas I have read online.

I am really glad,  I learned how to make a child theme before the problem today happened. I will be posting an article about the issues I had when creating my child theme. Hope it will help you, when you do yours.

Reminder: For security reasons, it is recommended to remove any inactive themes from the wp-content/themes folder. I must say, if you want to keep a backup of your child theme, save it on a different directory outside the public folder. Keep only the parent theme and the child theme on the themes folder location.

Ymatruz is the author of poetry book: The Coffee Cries Foul. She founded PoetsGig.com hoping to accommodate works of other poets and writers, anywhere in the world. She also writes about her blogging and migration experience on PoetsGig. Her motto: "By experience you learn. By embracing mistakes, you become a master of perfection."
Follow on: Twitter | Facebook | Instagram


Thank you for reading. Tell us what you think.