Results 1 to 5 of 5

Thread: Theme Hooks

  1. #1
    dancole's Avatar
    dancole is offline Tavern Regular
    Join Date
    Jan 2009
    Location
    USA
    Posts
    237

    Default Theme Hooks

    If you were stuck with only the Classic and Default theme and you couldn't edit them, what hooks would you wish those themes had, which aren't in there now? Describe the location.

    In terms of hooks, what makes Thematic, Hybrid, or some other advanced theme better than the Classic and Default themes?

    What are some locations that plugins can't hook into for most themes? or What are the name of WordPress plugins that makes you insert PHP code manually?
    Dan Cole, Future Engineer.

  2. #2
    Jeffro's Avatar
    Jeffro is offline WPTavern Forum Admin
    Join Date
    Jan 2009
    Location
    Ohio
    Posts
    2,359

    Default

    I know many of Lester Chen's plugins come with a widget but also come with a function that you need to add to your code in order for it to work such as PostViews, PostRatings, etc.

  3. #3
    andrea_r's Avatar
    andrea_r is offline WordPress Rockstar
    Join Date
    Jan 2009
    Location
    Eastern Canada
    Posts
    1,325

    Default

    What are some locations that plugins can't hook into for most themes?
    The sidebar. That's one of the few locations you just can't hook into. Sort of a non-issue with single WP, but when you get into WPMU, there are a number of legit reasons you want to have something in the sidebar show up on everyone's blogs without them being able to remove it, and without editing every single theme.

  4. #4
    epicalex's Avatar
    epicalex is offline Hello World
    Join Date
    May 2009
    Location
    London, Berlin, Paris
    Posts
    41

    Default

    I agree with Andrea, the sidebar would be the one place I'd think of. The ability to stipulate an order within that hook, ie make this bit come above that bit would also be useful for a sidebar.

  5. #5
    Otto's Avatar
    Otto is offline On The Rocks
    Join Date
    Apr 2009
    Location
    Memphis, TN
    Posts
    865

    Default

    Make yourself a sidebar widget, then force it into the sidebar with the 'sidebars_widgets' filter. The sidebars_widgets filter gets passed an array of the active sidebar widgets before they get displayed. All the params and everything else is in here, so faking a widget is pretty easy. Order of the widgets can be controlled by simply reordering this array.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •