Action Hook Descriptions

  • jrothra

    #8779

    Between the Graphene options and the action hooks I’m confused. I can see the list of what the action hooks are, but what do each of them do?

    Looking under Graphene Options “includes/theme-loop.php” there are two action hooks:

    – graphene_show_adsense

    – graphene_adsense

    However, under the Options General tab there is the “Adsense Options” section. How’s that differ from the action hooks above? What do those two action hooks do? Where do they go?

    jrothra

    #42148

    On a related note, what’s the difference in action hooks between graphene_before_slider and graphene_before_slider_root?

    Mod

    Kenneth John Odle

    #42149

    The Adsense option simply inserts whatever code you insert there below the first three posts of your blog. It’s actually a placeholder, really. You don’t have to use Adsense, you could use it to insert a picture of your pet unicorn, if you wanted. 😉 For a long time, I used it for both Adsense and another advertising platform at the same time.

    The best way to think of an action hook is as a shelf. The action hook is there; you can then put whatever you want on it. It can be text, images, javascript, html, and in some cases, php.

    A Graphene action hook widget area are action hooks built in to the Graphene theme, which you can then activate as widgets. This means that if you activate an action hook widget area, it then shows up as a widget area in your widgets pane. You can drag any kind of widget to it. In many cases, most people use a text widget to add some html or javascript to that area of their page. You can also add php, but you will need a separate php widget plugin to handle that.

    Quote:
    On a related note, what’s the difference in action hooks between graphene_before_slider and graphene_before_slider_root?

    These simply refer to different locations with regard to the slider. Unfortunately, we haven’t developed a “map” of the action hook widget areas (which we probably should in the documentation), so I have found the best way to figure things like this out is to activate both of them, add a text widget to each one, and in the text box of the text widget, type the name of the action hook widget area. Once you save them and view your page, it’s easy to figure out where each one goes.

    Hope this helps. Action hook widget areas are a lot of fun, once you find the right one.

Viewing 3 posts - 1 through 3 (of 3 total)

  • You must be logged in to reply to this topic.