-
Notifications
You must be signed in to change notification settings - Fork 9
/
functions.php
49 lines (35 loc) · 1.23 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
<?php
if ( ! function_exists( 'paparless_theme_support' ) ) :
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* @since My theme name 1.0
*
* @return void
*/
function paparless_theme_support() {
// Add support for block styles.
add_theme_support( 'wp-block-styles' );
// Enqueue editor styles.
add_editor_style( 'style.css' );
}
endif;
add_action( 'after_setup_theme', 'paparless_theme_support' );
/*-----------------------------------------------------------
Enqueue Styles
------------------------------------------------------------*/
if ( ! function_exists( 'paperless_styles' ) ) :
function paperless_styles() {
// Register Stylesheet
wp_enqueue_style('paperless-style', get_stylesheet_uri(), array(), wp_get_theme()->get('Version'));
wp_enqueue_style('paperless-style-blocks', get_template_directory_uri() . '/assets/css/blocks.css');
}
endif;
add_action( 'wp_enqueue_scripts', 'paperless_styles' );
/*-----------------------------------------------------------
Customising The Excerpt Lenght
------------------------------------------------------------*/
function custom_excerpt_lenght($length) {
return 25;
}
add_filter('excerpt_length', 'custom_excerpt_lenght');