ThemeShaper Forums » Thematic

[closed]

Custom hook

(6 posts)
  • Started 4 years ago by Jamie Mitchell
  • Latest reply from Kyle
  • This topic is not resolved

Tags:

  1. Jamie Mitchell
    Member

    Hey all...

    is it possible to add another hook, just like the thematic_belowheader

    i need one for a custom front page, and there does not seem to be any hooks for pages (hint, hint Ian)

    so i need to create a new hook, which i will use just about the container div of my front-page, this will be used to add some new custom widgets i created.

    thanks in advance...

    j

    Posted 4 years ago #
  2. Hi,

    there's no need for an extra hook .. is_front_page() is your friend.

    function my_action() {
        if (is_front_page()) {
            <!-- Whatever you want to include here -->
        }
    }
    add_action('anyThematicActionHook', 'my_action'};

    Chris

    Posted 4 years ago #
  3. Kyle
    Member

    As you can tell from my question, I'm new to Thematic and the whole concept of child themes.

    In your code, Chris, you have "anyThematicActionHook." Looking at the list of hooks, I don't understand how I include something in the "container" or "content" area, above any other page content, posts, etc.

    Thanks in advance. I'll understand this all just yet!

    Posted 3 years ago #
  4. The action hook i use most of the time to stick things above the content is thematic_belowheader .

    Posted 3 years ago #
  5. Kyle
    Member

    Ya, I saw that one, but I don't want it to be above the sidebar.

    Posted 3 years ago #
  6. Kyle
    Member

    Well, I resorted to installing a plugin that allows me to include PHP in posts/pages. However, I'd really rather be able to hook my PHP component. Again, I'd like it to appear first in the "container" or "content" area so that it's flush with the sidebar.

    Thanks.

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.