-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunctions.php
More file actions
108 lines (64 loc) · 2.33 KB
/
functions.php
File metadata and controls
108 lines (64 loc) · 2.33 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
//********** Initial Theme Support ***********//
//*******************************************//
function ieatwp_functions(){
load_theme_textdomain('ieatwp', get_template_directory().'/languages');
add_theme_support('automatic_feed_links');
// Title of the website
add_theme_support('title-tag');
// Featured image support for post and pages
add_theme_support('post-thumbnails');
// HTML5 support for certain places
add_theme_support('html5', array('comment-form','comment-list','gallery', 'caption'));
//Post formats in Post page
add_theme_support('post-formats', array('aside','image','video','quote','link','gallery','audio'));
// Menu register
register_nav_menus(array(
'primary' => __('Primary Menu', 'ieatwp')
));
//Optional
//Place shortcode in Widget text field
add_filter( 'widget_text', 'do_shortcode');
// Custom header
add_theme_support( 'custom-header' );
// Custom Logo
add_theme_support( 'custom-logo' );
// Custom Background
add_theme_support( 'custom-background' );
}
add_action('after_setup_theme','ieatwp_functions');
//******** Enqueue Style & Scripts ***********//
//*******************************************//
function ieatwp_style_scripts(){
//**Enqueue Styles**//
wp_enqueue_style('ieatwp-bootstrap-theme', get_template_directory_uri().'/css/bootstrap-theme.css');
/*Fonts*/
wp_enqueue_style('OpenSans', '//fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600italic,600,700,700italic,800,800italic');
/*Stylesheet*/
wp_enqueue_style('stylesheet', get_stylesheet_uri() );
//**Enqueue Scripts**//
wp_enqueue_script('jQuery');
/*Bootstrap JS*/
wp_enqueue_script('bootstrap-js', get_template_directory_uri().'/js/bootstrap.min.js');
/*Contact Form*/
wp_enqueue_script('contactform', get_template_directory_uri().'/js/contactform.js');
}
add_action('wp_enqueue_scripts', 'ieatwp_style_scripts');
//******** Register Taxonomy/Category ********//
//*******************************************//
add_action( 'init', 'create_book_tax' );
function create_book_tax() {
register_taxonomy(
'portflio-cat',
'portflio',
array(
'label' => __( 'Portfolio Cats' ),
'rewrite' => array( 'slug' => 'portfolio-category' ),
'hierarchical' => true,
)
);
}
//Register Custom Post Type
//Register Sidebar/Widget
//Register Custom Metabox
//Register Shotcode