ThemeShaper Forums » Thematic

Integrating Action Hooks into sidebars / asides

(4 posts)
  • Started 5 years ago by Chris
  • Latest reply from Chris
  • This topic is not a support question
  1. I need your help!

    Are there any reasons, why we should integrate action hooks into sidebars / asides as an alternative to widgets?? (the before / after widgetized area hooks are existing)

    Please keep in mind that you're able to distribute your own widgets. Just copy the widgets into the directory /child_theme/widgets.

    Cheers,

    Chris

    Posted 5 years ago #
  2. Mmmh .. the community isn't too responsive :-)

    Hey Ian,

    if nothing speaks against it from your side, I'm going to integrate it. If we take a look on the 'regular' sidebar it would be something like:

    no widgets and no actions => display the standard hard coded 'widgets'
    widgets and no actions => display the configured widgets
    actions defined => display the defined actions (no widgets are displayed)

    Cheers,

    Chris

    Posted 5 years ago #
  3. So the existing widgets and the dynamic bits are loaded in an action that can be removed via plugin a la Tarski?

    Posted 5 years ago #
  4. Not exactly .. and don't know how this compares to Tarski .. by installing Thematic and a child theme the left or right sidebar or both would display the hard coded content .. that's still as usual ..

    the basic idea for my changes was to use either widgets or functions for the sidebar areas or asides .. if you define widgets and no actions, the defined widgets will be displayed .. as soon as you define actions, only the actions would be displayed.

    Benefits are: writing actions is easier compared to widgets, a child theme could completely control the content and the position of the actions ('widgets') within the functions.php without the need to walk through the wp_admin menu. A child theme could even control the position of the actions depending on index, pages, archives, single page and so on without the need of additional plugins.

    Removing a sidebar is implemented for the right / left / both sidebars .. and for these it makes sense. I might implement a similar function for the asides, just in case that someone wants to remove these asides from special pages or single posts.

    Posted 5 years ago #

RSS feed for this topic

Reply

You must log in to post.