CPT Single Post Template with Content Check

This code is written to work with Pippin’s Easy Custom Post Types. While we’re making heavy use of Types & Views these days (check them out, they’re effin’ awesome), we thought this code might be handy to someone out there in WP land. We used this function to create a custom post type for listing [...]

Members-Only WordPress menus

// register the new sidebar; this will hold a WP custom menu widget, give it a logical name register_sidebars(1,array(‘name’ => ‘Members-Only Menu’, ‘before_widget’ => ‘<li id=”%1$s”>’, ‘after_widget’ => ‘</li>’, ‘before_title’ => ‘<h3>’, ‘after_title’ => ‘</h3>’ ) ); // create function to display widget // this menu is limited to user levels above “subscriber” function widgetized() [...]

A different way to include stylesheets

Here’s another way to link to stylesheets. It may be overkill for some things, but definitely useful for plugin developers. I’m thinking of sending the link to every plugin author who echoes 50 lines of CSS into my page headers. Thanks alot.

Why limit yourself to Thesis Hooks?

Nuh uh. Not when you can start using WordPress Action Hooks to get more done!

Use hook to add another specialized style sheet

As used on Paisley Farm’s site. function add_recipe_styles() { $sheet = get_bloginfo(‘template_url’) . ‘/custom/recipes.css’; echo “\n”; echo ‘<link rel=”stylesheet” href=”‘ . $sheet . ‘” type=”text/css” media=”screen, projection” />;’; } add_action(‘wp_head’,'add_recipe_styles’);

Drop shadow with CSS for all web browsers

From this site. .shadow { -moz-box-shadow: 3px 3px 4px #000; -webkit-box-shadow: 3px 3px 4px #000; box-shadow: 3px 3px 4px #000; /* For IE 8 */ -ms-filter: “progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color=’#000000′)”; /* For IE 5.5 – 7 */ filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color=’#000000′); }