-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
44 lines (41 loc) · 1.29 KB
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
function barewp_setup() {
register_nav_menus(array(
'primary' => __( 'Primary Menu', 'barewp' ),
));
}
add_action('after_setup_theme', 'barewp_setup');
function show_nav($menu, $menu_class='menu') {
$defaults = array(
'theme_location' => '',
'menu' => $menu,
'container' => 'div',
'container_class' => '',
'container_id' => '',
'menu_class' => $menu_class,
'menu_id' => '',
'echo' => true,
'fallback_cb' => 'wp_page_menu',
'before' => '',
'after' => '',
'link_before' => '',
'link_after' => '',
'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>',
'depth' => 0,
'walker' => ''
);
wp_nav_menu( $defaults );
};
add_theme_support( 'post-formats', array( 'aside', 'image', 'link', 'quote', 'status' ) );
add_post_type_support( 'page', 'post-formats' );
add_action( 'init', 'create_my_post_type' );
function create_my_post_type() {
register_post_type( 'my_custom_post_type',
array(
'labels' => array( 'name' => __( 'Products' ) ),
'public' => true,
'supports' => array('title', 'editor', 'post-formats')
)
);
}
?>