How To Edit Functions.php In WordPress

WordPress offers the flexibility of customizing the current themes to your preferences. You can decide on the functionality, features and look & feel of the themes you are using.  All this is possible, by adding codes in the template file available for each theme, called “functions.php”.

For customizing the look & feel, you will need to edit “style.css”, here’s the tutorial: How to edit style.css in WordPress.

Functions.php is a theme file offered by WordPress to provide theme functions. You can customize any WordPress theme by adding the required php codes to this file. It offers you the flexibility of adding favicon to your weblog, posting thumbnail images, customizing dashboard logo, enabling threaded comments, customizing footer area and so on. You can access and edit the functions.php either by using a ftp client or simply through WordPress.

Access functions.php By Using FTP Client (We Use FireFTP For Firefox)

  1. Start the FTP client, select “Tools > FireFTP ” (Firefox addon to serve as an FTP client).
  2. Click “Connect” and provide the credentials (username and password) to connect to your FTP server (the host).
  3. Locate Functions.php by following the directory structure given below:
    [WordPress Root] > wp-content > Themes > [current_theme] > functions.php.
  4. Download the file and edit the file with the editor of your choice (by adding the required code).
  5. Upload the file to update the theme with changes made to the file.

Access functions.php Through WordPress Admin

  1. Log in or sign in WordPress as administrator.
  2. Select “Appearance > Editor” from the sidebar.
  3. In the editor, select the theme which you want to edit from “Select theme to edit” drop-down menu.
  4. Locate and double-click “Themes Functions (functions.php)” under “Theme Files”, “Templates” section.
  5. Make the desired changes to the file and click “Update File” to reflect the changes made to the file.

Always back-up functions.php before making changes; the back-up file comes in handy for restoring the default file in case WordPress goes crazy.

Divi WordPress Theme