Is Your ‘functions.php’ File Tired?

wordpress-plugin

I didn’t know a WordPress ‘functions.php’ file could get tired, did you?

What I did know, is that it’s usually better to code changes to WordPress oppose to over using and relying on Plugins to do all your lifting. One place that a lot of code changes and modifications goes is in the ‘functions.php’ of your theme file. After reading a great article on How to create your own WordPress functionality plugin, there’s an even a better way to go about making changes.

There are some other reasons why you should be careful about pouring so much into the file, too.

The reason this is a bad idea, in short, is that it will tie your critical site functionality to a theme that will eventually change. Good news, though: there is a much better, smarter alternative. It’s called a functionality plugin.

Putting particular functionality changes in a plugin vs. the theme, can make changing, updating, and moding a theme easier, since it won’t alter some of the core changes you’re trying to make: i.e. Custom Post Types.

If you feel hesitant about digging into plugin work, don’t.

First of all, the thing to realize with plugins is that, for all intents and purposes, they behave no differently than your theme’s functions.php file. I won’t say there are no differences, of course, but a plugin file should not be treated as something foreign and strange. If you’ve edited your functions.php file — even if you’ve just edited it by dropping in PHP that you found searching online — then you are familiar enough to manage your own plugins.

How exciting is that!

So, give Ryan Imel‘s tutorial a read. It isn’t just a tutorial, either. He does a great job of explaining what should and shouldn’t go in the ‘functions.php’ and what should go in your newly coded “functionality plugin.”

Be sure to comb through the comments, too. Many times you can glean some extra education!

Enjoy!

[via WP Candy]

10 SHARES

Eric Dye

I am an entrepreneur and human rights advocate. I spend most of my time as writer and editor for ChurchMag and Finding Justice, but you can also find me working on Live Theme and for the International Human Rights Group. All while enjoying my family and sipping espresso in Italy.

Trackbacks

What would you like to say?

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>