Ad Positions Widget
if ( ! function_exists('epg_ad_positions') ) {
// Register Custom Post Type
function epg_ad_positions() {
$labels = array(
'name' => 'Ad Positions',
'singular_name' => 'Ad Position',
'menu_name' => 'Ad Position',
'parent_item_colon' => 'Parent Position:',
'all_items' => 'All Ad Positions',
'view_item' => 'View Position',
'add_new_item' => 'Add New Position',
'add_new' => 'Add New',
'edit_item' => 'Edit Position',
'update_item' => 'Update Position',
'search_items' => 'Search Position',
'not_found' => 'Not found',
'not_found_in_trash' => 'Not found in Trash',
);
$args = array(
'label' => 'epg_ads',
'description' => 'Ad Positions',
'labels' => $labels,
'supports' => array( 'title', 'editor', 'custom-fields', ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => false,
'menu_position' => 100,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => true,
'publicly_queryable' => true,
'rewrite' => false,
'capability_type' => 'page',
);
register_post_type( 'epg_ads', $args );
}
// Hook into the 'init' action
add_action( 'init', 'epg_ad_positions', 0 );
}