-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
41 lines (36 loc) · 1.55 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
<?php
// -------------------------------------
// Load the stylesheet
// -------------------------------------
function limitless_load_scripts(){
wp_enqueue_style('limitless-style', get_stylesheet_uri());
wp_enqueue_script('main', trailingslashit(get_template_directory_uri()) . 'js/functions.js',
array('jquery'));
}
add_action('wp_enqueue_scripts', 'limitless_load_scripts');
//----------------------------------------------------------------------------------
// Setup the theme
//----------------------------------------------------------------------------------
function limitless_theme_setup(){
add_theme_support( 'post-thumbnails' );
add_theme_support( 'custom-logo', array(
'height' => 100,
'width' => 400,
'flex-height' => true,
'flex-width' => true,
'header-text' => array('site-title', 'site-description'),
) );
add_theme_support('title-tag');
register_nav_menus( array(
'primary' => __('Primary Menu', 'limitless'),
'footer' => __('Footer Menu', 'limitless')
));
}
add_action('after_setup_theme', 'limitless_theme_setup');
// ------------------------------------------------------------------------------
// Allow the site title to display in customize preview when logo is removed
// ------------------------------------------------------------------------------
function limitless_logo_refresh($wp_customize){
$wp_customize ->get_setting( 'custom_logo' )->transport = 'refresh';
}
add_action('customize_register', 'limitless_logo_refresh', 20);