-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
106 lines (95 loc) · 2.58 KB
/
functions.php
File metadata and controls
106 lines (95 loc) · 2.58 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
106
<?php
/*
*
*Table of contents:
* 1. Theme Support
* 2. loading Assets
* 3. Theme Customizer
* 4. Navigation Menus
* 5. Widgets
* 6. Custom Post Types
*
*/
//https://developer.wordpress.org/reference/functions/add_theme_support/#custom-logo
add_theme_support('title-tag');
add_theme_support( 'html5', array( /*'comment-list', 'comment-form', 'search-form', */'gallery', 'caption' ) );
add_theme_support( 'custom-header', array(
'header-text' => false
));
add_theme_support( 'custom-logo' );
/*
*
*Load Assets
*
*/
function linked_assets(){
wp_enqueue_style('theme_styles',get_stylesheet_uri());
wp_enqueue_script('theme_script', get_stylesheet_directory_uri() . '/assets/scripts/scripts.js');
wp_enqueue_script('animejs', get_stylesheet_directory_uri() . '/node_modules/animejs/lib/anime.min.js');
wp_enqueue_script('rellax', get_stylesheet_directory_uri() . '/node_modules/rellax/rellax.min.js');
// For free fonts go to https://fonts.google.com/
wp_enqueue_style('google-fonts','https://fonts.googleapis.com/css?family=Montserrat');
}
add_action('wp_enqueue_scripts','linked_assets');
/*
*
* Theme Customizer
* https://codex.wordpress.org/Theme_Customization_API
*
*/
// function theme_customize_register( $wp_customize ){
// $wp_customize->add_section('fonts', array(
// 'title' =>__('Custom Fonts', 'fonts'),
// 'description' => 'Change the fonts for different sections of the theme',
// 'priority' => 50,
// ));
// $wp_customize->add_setting( 'font_page_header', array(
// 'default' => '',
// 'transport' => 'refresh',
// ) );
// $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'font_page_header', array(
// 'section' => 'fonts',
// 'type' => 'text',
// 'label' => esc_html__( 'Header Font', 'theme' ),
// ) ) );
// }
// add_action( 'customize_register', 'theme_customize_register' );
/*
*
* Dynamic Navigation Menus
*
*/
// function my_menus(){
// register_nav_menu('header-menu','Main Navigation Menu');
// }
// add_action('init','my_menus');
/*
*
* Widgets
*
*/
// function widgets(){
// register_sidebar(array(
// 'name' => 'Sidebar for the Homepage',
// 'description' => 'The sidebar for the homepage',
// 'id' => 'home'
// ));
// }
// add_action('widgets_init','widgets');
/*
*
* Custom Post Types
*
*/
// function create_posttype(){
// register_post_type('projects', array(
// 'labels' => array(
// 'name' => __('Projects'),
// 'singular_name' => __('Project')
// ),
// 'public' => true,
// 'has_archive' => true,
// 'rewrite' => array('slug' => 'projects'),
// ));
// }
// add_action('init', 'create_posttype');