WeDoWordPress

Affordable Website Design Solutions For The Small Business MArket

  • Home
  • Contact Us
  • Facebook
  • Twitter
  • Google+

Don’t Fear WordPress Updates Just Prepare

October 8, 2014 by marketmech

There are a lot of great code snippets floating around the web and this can be an easy way to add functionality to your website. With that said, there has been some controversy over whether it belongs in a plugin or your functions file. Of course there are arguments for both but in most cases I feel that it has a simple answer. If you can avoid modifying your current theme then you no longer have to fear losing features if and when you decide to update or change to another theme.

A very common mistake people make is relying on features included in premium themes such as portfolios and theme options. These are a lot of times built into themes to make things simple but can also keep you stuck using their product and lead to more problems down the road. This is in many cases is a real concern that can be avoided by not relying on the developers and taking control of your own content.

Let me explain. Say for instance you’re using a theme by a developer that decides to stop supporting theme updates. If you are using a portfolio that is directly tied into the theme itself, changing to another theme can leave you without a way to manage your content. What many people don’t know is that you can simply manage something like this with a plugin. This can be beneficial for multiple reasons but one of the most important besides insurance of your content is debugging.

Imagine the functions file of your theme with hundreds of lines of code. Now imagine trying to find an error while sifting though line after line. This can be avoided and simplified by managing custom code modifications in a plugin. Debugging is as simple as disabling the problematic plugin and moving on. You no longer have to worry about accidentally breaking your site and risking down time.

The Solution?

Build a plugin. I believe part of the reason people are adding snippets to their functions file is because they think that creating a plugin is difficult. In reality creating a plugin is quite simple and takes no more effort. I have provided the example code below to get you started. Simply add your information to the header and replace the function with your own. Save as a .php file and upload it to /wp-content/plugins/ of your WordPress site. Alternatively you can add the file to a zip folder and upload using the plugin uploader in your dashboard.

 

In Conclusion

So next time you feel tempted to add another piece of code to your functions file I challenge you to take the extra step and create a plugin instead. This will take the fear out of future updates and let you rest easy knowing that your content is safe. For more information on writing plugins you can take a look at the WordPress codex.

Filed Under: Blog

Our Newsletter

Sign up for our newsletter to get meaningful content, the inside track on theme releases, special offers, helpful tips and tricks.

Social Master

Weather Forecast

Hamilton, 1ºC

Wednesday, 1ºC

snow

Thursday, -2ºC

sky is clear

Friday, 2ºC

sky is clear

Saturday, 4ºC

moderate rain

Sunday, 5ºC

moderate rain

Monday, -2ºC

light snow

Tuesday, -0ºC

scattered clouds

Full Weather

From The Blog

A 301 Redirect Will keep you from losing your Page Rankings if you Revamp / Redo your Web Site

Don’t Fear WordPress Updates Just Prepare

Resources

  • Testimonials
  • Contact Us
  • Build Your WordPress Hosting Plan

Sign Up for Our Newsletter

Sign up for our newsletter to get meaningful content, the inside track on theme releases, special offers, helpful tips and tricks.

Copyright © 2021 Design & Hosting By WeDoWordPress Powered By Market Mechanics
Privacy Policy | Website Support