Thesis WordPress Theme – Mastering Custom Hooks and Functions in Thesis

Thesis is a very flexible theme. It can be customized very easily using what developers call “Thesis Hooks.”

Thesis Hooks can change every part of your WordPress blog. In this WordPress tutorial, I’m going to show you how to modify your Navigation Menu.

You have probably noticed that the default installation always has the Navigation Menu on top of the default screen. You can change the default location by using Thesis hooks. By using Thesis Hooks, you can move the Navigation menu to appear below the blog title and blog description.

So, let’s get started with using custom hooks and functions in the Thesis theme for WordPress.

Follow theses steps:

  1. Access the User Guide
  2. Find the support page
  3. Click on Thesis Default Hook Usage
  4. Access the Member’s Area
  5. Find, click, and read the page called “How to Customize Like a Pro with Thesis Hooks”
  6. Access the link “Make Your Header Display Above your Navigation Menu”
  7. Find the appropriate code, and copy it
  8. Return to your WordPress blog
  9. Paste the code in the entry box in Custom File Editor

Thesis Default Hook Usage:

Go ahead and access the Thesis Theme Member’s Area to get started. On this page, you can access information about Thesis Hooks and which actual hooks are needed to achieve different looks on Thesis. Generally speaking, each function requires a pair of codes. The first code is called the function. The second code is called the hook. You need to enter both of these codes in order to build a custom function in Thesis.

Find the page called “How to Customize Like a Pro with Thesis Hooks.” There, you will find a tutorial including real examples. Go ahead and click on the link to access the tutorial. Feel free to read through the entire page.

Next, find the link called “Make Your Header Display Above your Navigation Menu.” Find the code, and then copy it. Next, return to your WordPress blog. You will paste this code in your Custom File Editor.

Enable your Thesis hook functions by changing WordPress settings:

  1. Find the Thesis Options tab
  2. Click on Custom File Editor
  3. Select the custom_functions option
  4. Click on Edit Selected File
  5. Access WordPress using FTP
  6. Click on wp-content
  7. Click on Themes
  8. Click on Thesis
  9. Click on Custom
  10. Access the custom_functions.php page
  11. Right click the link
  12. Choose File Permissions
  13. Change the permissions to 777
  14. Click on OK

The next step is to find the Thesis Options tab. Click on Custom File Editor. Then, from the drop-down menu, you can either select custom.css, layout.css, or custom_functions. For this purpose, you need to select the custom_functions category. Then, click on Edit Selected File. In order to run custom_function, you need to set up the correct file permissions on your WordPress blog.

Access your WordPress site using an FTP application. Then, click on wp-content. Click on Themes. Then, click on Thesis. Next, click on Custom. You will see the custom_functions.php page. Right click this link, and then choose File Permissions. Change the permissions to 777 and then click on OK.

Move the Navigation Menu by using Thesis Hooks

  1. Return to Member’s Area
  2. Remove the Thesis Navigation menu using thesis_hook_before_header
  3. Copy the code
  4. Go back to Thesis Custom File Editor
  5. Find entry box, paste the copied code
  6. Click on Save
  7. Refresh the page to verify settings

For now, let’s return to the Members Area code again. In order to make the Navigation Menu move from the top to the beneath the header, there are two sets of actions that need to be completed. The first is a remove action, which is to remove the Thesis Navigation menu from the current location of thesis_hook_before_header.

The second action is to add the action back into the appropriate area on Thesis Hooks. Copy this code, and then go back to the Thesis Custom File Editor. Once you are on the Thesis Custom File Editor page, you will see comments and notes that appear by default. These comments and notes show you how to add custom hooks, or custom functions. Find the entry box, and paste the copied code exactly as it appeared in the Members Area example. Then, click the Save button.

After you have clicked save, it will confirm the changes. Refresh the page. Now, take a look at the changes. You can see that the Navigation Menu now appears before the header and beneath the blog title and description.

Remove the Thesis Attribution Link using Thesis Hooks

  1. Click on the link “Get Smart with the Thesis WordPress Theme from DIY Themes”
  2. Return to Member’s Area to access the code format to remove a function
  3. Find the specific Thesis attribution code link
  4. Copy the code
  5. Return to File Editor
  6. Paste the copied function
  7. Go back to Support Area
  8. Click on User Guide
  9. Find Thesis Default Hook Usage
  10. Find and click on the pair of codes called Thesis Attribution
  11. Copy the function
  12. Paste the function into the entry box
  13. Copy the hook
  14. Paste the hook into the entry box alongside the function copy
  15. Click on Save

In the next example, let’s discuss removing the Thesis attribution link. If you want to remove the default Thesis attribution link, click on the link that reads, “Get Smart with the Thesis WordPress Theme from DIY Themes.” Go back to the Member’s Area to find the code format to remove a function. Find the code for the Thesis attribution link. Copy the code, and then go back to File Editor. Right below the body of text, go ahead and paste the copied function.

Next, find the correct hook name and the correct function to complete the process.

Now, go back to the Support Area. Click on User Guide. Then, look for Thesis Default Hook Usage. Once you have accessed the page, you will find a useful example as to the pair of codes that are needed to make this change work. Click on the codes, and then find the one called Thesis Attribution.

Next, copy the function. Then, paste the function in the entry box. Now, copy the hook. You will paste the hook into the entry box alongside the function copy. Click on Save. Then, you will be prompted with a confirmation message. To confirm the changes, refresh the page and the footer should be gone.

By using Thesis Hooks, you can virtually customize Thesis however you want. If you need additional help, you can use online support forums and the user guide. The forums are active with a lot of advanced WordPress and Thesis users. Using the available resources is helpful if you run into any customization issues using Thesis Hooks for WordPress.