wordpress / thematic framework filters and actions

I’m building a new content-managed website for Congregation Beth Shalom, a local synagogue, using Wordpress and the Thematic Framework.

While researching slick, thematic ways to only do a filter on non-home pages, I came across this suggestion to add actions to the init action tag.  It makes a lot more sense to use the wp action tag, though, so various wordpress template variables are made available, e.g.

function remove_ulcl() {
 remove_filter('wp_page_menu','thematic_add_menuclass');
}

function add_ulcl() {
 if(!is_home()||!is_front_page()) {
 add_filter('wp_page_menu','thematic_add_menuclass');
 }
}

add_action('wp', 'remove_ulcl');
add_action('wp', 'add_ulcl');

Isn’t that nice? I’m digging Thematic. It’s so wordpress-y.

This entry was posted in Tech and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

  • Tags

  • Pages

  • Categories

  • Archives

  • @bnchdrff

    twits