So ... Let's see the actual problem ...

Let's say, that you want to upload an e-book cover using the popular PSD (Photoshop) file format. The default Wordpress media uploader will give you the following error message:


As you can see, security is the main reason behind the limitation on file types that users can upload. And this is why you need to "update" your theme’s functions.php file ...

The functions.php file (or the theme functions file) can be found in your theme’s folder, and basically, is nothing else, but a template used by your theme. It gets automatically loaded in order to define the essential filters, functions, actions, CSS classes, etc. Every installed theme has its own folder and functions.php file, but only the active theme’s file will run its code.

In other words, it can be used to easily add features and extend the functionality of both the theme and the Wordpress installation. The truth is that editing/altering the functions.php file is a very common method and will allow you to customize or implement an almost endless array of filters and actions that can make make your site nicer, more user-friendly, etc ...

BUT! Altering the functions.php file can also crash your site, so if you are not an advanced user don't make it a habit! What I'm trying to say here: don't get avid! There's a huge difference between adding two lines of code to allow additional uploadable file types and inserting complex scripts to enable new menus ... And ALWAYS ...

  • create a full backup of your site before altering the functions.php file
  • create an offline backup copy of your original functions.php file

With that having said, let's see the magic ...



Join the Discussion
Write something…
Recent messages
AlanJE Premium Plus
Thanks for the great training, Zed, I bookmarked it for reference, Alan
Reply
BorisRoman Premium Plus
Awesome training!
Thanks a lot!
Wish you a smooth weekend!
Bob
Reply
smartketeer Premium
Thanks Bob!

Have a great weekend!
Reply
dowj01 Premium
Awesome, thank you. You have made a complex activity quite straightforward.
Justin
Reply
smartketeer Premium
Thanks for the time Justin!
Reply
Top