This repository has been archived by the owner on Apr 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
functions.php
87 lines (75 loc) · 1.85 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
/**
* X5: Theme specific functionalities
*
* Do not close any of the php files included with ?> closing tag!
*
* @package WordPress
* @subpackage X5
*/
define( 'X5', 'x5' ); // used in translation strings
function x5_load_features() {
$features = scandir( dirname( __FILE__ ) . '/features/' );
foreach ( $features as $feature ) {
if ( current_theme_supports( $feature ) ) {
require_once dirname( __FILE__ ) . '/features/' . $feature . '/' . $feature . '.php';
}
}
}
add_action( 'init', 'x5_load_features' );
add_theme_support( 'seo-title' );
add_theme_support( 'threaded-comments' );
add_theme_support( 'comments' );
// add two navigation menus
add_theme_support( 'menus', array(
'navigation-top' => __( 'Top Navigation Menu' ),
'navigation-foot' => __( 'Footer Navigation Menu' ),
) );
// add 3 default sidebars
add_theme_support( 'sidebars', array(
array(),
array(),
array(),
) );
add_theme_support( 'images', array(
'400x500' => array(
'width' => '400',
'height' => '500',
'crop' => true,
),
) );
add_theme_support( 'cpt', array(
// team post
'x5-team' => array(
'singular' => 'Team Member',
'plural' => 'Team Members',
'publicly_queryable' => true,
'rewrite' => array( 'slug' => 'team', 'with_front' => true ),
),
) );
add_theme_support( 'custom-tax', array(
// taxonomy like category
'x5-team-tag' => array(
'singular' => 'Member Category',
'plural' => 'Member Categories',
'rewrite' => array( 'slug' => 'category', 'with_front' => false ),
'posts' => array( 'x5-team' ),
),
) );
add_theme_support( 'settings', array(
'opt1' => array(
'type' => 'text',
'name' => 'fb',
'desc' => 'Facebook link',
),
'opt2' => array(
'type' => 'dropdown_pages',
'name' => 'dropdown-pages',
'desc' => 'Testing dropdown pages',
),
'opt3' => array(
'type' => 'wp_editor',
'name' => 'wp-editor',
'desc' => 'Testing WP Editor',
),
) );