Many WordPress hacks depend on WordPress hooks and filters. If you want to add those hacks to your theme, probably the best way is using your theme’s functions.php file. In order to add codes to your theme’s function.php file, you can follow one of the ways explained below.


1. Using WordPress Theme Files Editor

editor1

If you can edit theme files (requires Administrator role), and your theme files are editable, you can edit your theme files using WordPress admin panel. To do this, simply follow those steps below:

  • Go to your WordPress dashboard (www.yoursite.com/wp-admin).
  • Navigate to Appearance > Editor.
  • Choose the theme you want to edit from the dropdown and the file from the right sidebar.

Please note that this method is dangerous, since you are editing online files, if your site is blocked because of an error, you will need FTP access to fix your error file.


[seealso ids=”6067,7982,4584″]


2. Using FTP to edit your functions file

If you have FTP connection information for your site, you can use FTP to edit your functions.php file:

  • Use your favorite FTP manager to access the location of your WordPress files.
  • Navigate to wp-content/themes/your-theme.
  • Open up the functions.php file and edit to your heart’s content!

Please note that the above methods will only work if your theme includes a functions.php file.
If functions.php file doesn’t exist in your wp-content/themes/your-theme directory, then you can create it.

I hope you liked this tutorial, Enjoy!

Comments (2)

  • Chazz York says:

    I am having a major problem with getting my comments to show. I have enabled comments on all blogs and pages and the comment text area and the comments themselves never show up. I am not sure what to do to fix the problem.

    • Metin Şaylan says:

      Does your theme have a comments.php file.
      If you can, switch to another theme and check if they are displayed.


Leave a Reply

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