Ninthlink launch : Doctors Advisory Council

The Doctors Advisory Council (DAC) “helps physicians and dentists make educated decisions in their business and personal lives”, and we here at Ninthlink just helped them launch their new website. Built on WordPress, I got to make use of the (relatively) new Custom Post Type features to create a user-friendly content management tool for storing / updating the Board Members‘ bios.

What that means is that with not tooo many lines of code, there is a new section in the WordPress admin area that holds the bio / info for each individual Board Member. I could even use WordPress’s default “Post Thumbnail” / “Featured Image” functionality for each member’s headshot.

add_action( 'after_setup_theme', 'dac_setup' );
if ( ! function_exists( 'dac_setup' ) ):
function dac_setup() {
// This theme uses post thumbnails
add_theme_support( 'post-thumbnails' );
// ...
set_post_thumbnail_size( 180, 270, true );
// ...
add_action( 'init', 'dac_init' );
// ...
}
endif;
function dac_init() {
// add "Members" Custom Post Type
register_post_type( 'dac_members',
array(
'labels' => array(
'name' => 'Board Members',
'singular_name' => 'Member',
'add_new_item' => 'Add New Member',
'edit_item' => 'Edit Member',
'new_item' => 'New Member',
'view_item' => 'View Member',
'search_items' => 'Search Board Members',
'not_found' => 'No members found',
'not_found_in_trash' => 'No members found in Trash',
'parent_item_colon' => '',
'menu_name' => 'Members'
),
'public' => true,
'public_queryable' => true,
'exclude_from_search' => true,
'show_in_menu' => true,
'menu_position' => 21,
'menu_icon' => get_bloginfo('template_url') .'/images/partner-icon.png',
'hierarchical' => true,
'supports' => array('title','editor','thumbnail','revisions','page-attributes'),
'register_meta_box_cb' => 'dac_memberboxes'
)
);
}

That, combined with cufón for the dynamic custom font type, made for a clean presentation, if I do say so myself.

Leave a Reply