Easy Way To Add Content Using Woo Themes Hook Manager

8 Flares Twitter 2 Facebook 0 Google+ 4 LinkedIn 2 Pin It Share 0 StumbleUpon 0 Buffer 0 Buffer 8 Flares ×

Woo themes offer a great feature called Hook Manager which allows you to add html, text or even shortcodes to any location there’s a hook. Normally with most other themes you would need to write some code and add it to your themes functions.php file.

Not if you’re using a Woo Theme.

Lets take a closer look at the Hook Manager and see how it works:

Hook Manager for Woo Themes

You’ll see five tabs on the left hand side which are the different sections of your website. Each section offers a range of hooks where you can add content simply by pasting it into the correct box.

  1. Header Hooks
  2. Main Hooks
  3. Post Hooks
  4. Footer Hooks
  5. WordPress Hooks

Example: If you wanted to add a banner or line or two of text/html to the end of every post, you would click the Post tab on the left and look for the hook which works in the location you want to add the content.

Hook Manager - Post Hooks

When you arrive at the Post Hooks, you’ll see a range of different boxes which represent the different locations of hooks for that particular section.

Here’s the 4 locations of the hooks for the Post section:

woo_post_before – Executed before each post.

woo_post_inside_before – Executed at the top, inside each post’s DIV tag.

woo_post_inside_after – Executed at the bottom, inside each post’s DIV tag.

woo_post_after – Executed after each post.

Hook Manager - Post Hook Locations

I’m sure by now you understand what hooks are so all you need to do is add the text or code to the correct box and the content will display in that location on all posts.

Not many themes offer a hook manager like Woo Themes so if you’re not using this theme you’ll need to add the hook and function along with other code and text to your themes functions.php file

Here’s a complete map of all Woo Hooks and the locations they execute.

Woo Themes Hook Map

woo-theme-canvas-hooks

You can use this map along with the Hook Manager to add text, html, links or even ads to any location which offers a hook by simply pasting the code into the correct box inside the Hook Manager.

This is a great way to start learning about hooks if you plan on learning php code where hooks and filters play a large part in WordPress customization.

Another great feature of the Hook Manager is you can  execute WordPress shortcodes in they hook locations as well.

Using Woo Hooks In Custom Functions

If you want to add content to any of the hooks positions in a Woo theme, you can also use a custom function. The custom functions should be placed in your child themes functions.php file.

As you can see with the Hook Manager, it doesn’t enable you to use every hook that Woo offers so you may need to use a custom function instead.

Here’s a few examples of PHP code using some popular hooks which are included in all Woo themes.You can use or modify these code snippets in order to hook in content or filter a function using any of the Woo hooks available.

Other Themes Hook Options

Clearly Woo themes hook manager is lacking when compared to some of the most popular theme frameworks which also provide a feature like this. The Genesis Simple Hooks plugin and Thesis hook management plugin are far superior as they enable you to execute PHP code in any hook position which isn’t possible with Woo’s hook manager.

8 Flares Twitter 2 Facebook 0 Google+ 4 LinkedIn 2 Pin It Share 0 StumbleUpon 0 Buffer 0 Buffer 8 Flares ×
Brad Dalton

Brad Dalton

WordPress Consultant 110+ Hrs/Week, traveler and lover of big surf, making new friends & my family. Read more about Brad Dalton or contact me if you need help with WordPress.
Brad Dalton

@wpsitesdotnet

Howdy! WP Sites creates daily tips & tutorials providing solutions for WordPress users.
Create A Custom Meta Box For A Custom Field http://t.co/ZnEBLGN5KO - 9 hours ago
Brad Dalton

Never Miss The Latest Design Tips!

Comments

  1. I am trying to use the hook feature, do you know if its normal for everything to disapear after you save it? Does it uspport Javascript? I am trying to ad adsense code and it doesn’t appear to be working.

    • Hello Cecily. I don’t think it does. Only shortcodes and HTML. Try posting this question in the Woo forums as they should have a solution for you. http://www.woothemes.com/support-access/

      You could create a widget area using hooks and then drag in a Adsense or text widget with your javascript.

      Another option is to use this code on this page in your Woo theme template files or add it to a custom function using Woo hooks.

  2. Coach Comeback says:

    Also cant get the hook section to work with another plugin’s shortcodes. I want to put optin box after my post but when I put the shortcode of the plugin in the hook section is does not show. If I put any other html codes it works fine.

    Is there a way to make it work with other plugins shortcodes?

    • What’s your name?

      • P. James Holland says:

        James Holland lol Most curious reply indeed? I tried a different option and got it to work. So I am happy now. Still learning Woo Themes framework

        • Good stuff James! I use the Genesis theme framework and SP child themes. Woo have been very disappointing.

          • Coach Comeback says:

            I agree Brad. I switched from Woothemes to Genesis last summer and was loving it… That is, until I needed to change out my header and could not do it without playing with code.

            I am soooo non-techy that I have to choose what works with the least amount of mouse clicks. I definitely prefer Genesis…. but woothemes tend to work more out-of-the-box for me and the admin panel is very dummy proof.

            Simplicity wins.

          • Come over to the StudioPress Community forums where i volunteer if you need help. I’ll look after any coding stuff you need.

  3. Coach Comeback says:

    OH… and don’t even get me started on Thesis!!!!!!!!!!

    That is a newbies NIGHTMARE!!!! X-O

  4. This article misses the point – where do you manage hooks. I’ve done it once and can’t remember how to get back to them

    • Brad Dalton says:

      Depends on which theme you are using but Woo Hooks provide a hook manager so you simply enter in your content to display it in that location.

      Thesis and Genesis also offer hook plugins or you can add the hook to a custom function.

      If your theme doesn’t offer hooks, you can add custom hooks to your parent themes template files easily enough.

      How does this article miss the point? And what point are you referring to?

  5. Hey Brad, Nice tutorial you’ve got here.

    I’ve tried adding adsense to the bottom of the post using the hook manager, the only problem with that is that the ads will show up on every post on the home page. Is there anyway of having them just on the post page and not the homepage?

    I’ve tried adding the code in the content-post.php and single.php with no luck.

Speak Your Mind

*

Need A Solution for WordPress?

solutions for wordpress
WP Sites offers new posts & 900+ existing tutorials which include:

  1. 1. The basics on using WordPress to build & design a website
  2. 2. Tested PHP & CSS code snippets for easy customization of your theme
  3. 3. Tips, tricks & idea's on how to solve problems with WordPress

 
Enter your email address below & click "Get Updates!"