/
functions.php
38 lines (31 loc) · 940 Bytes
/
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
<?php
function mytheme_setup_theme_supported_features() {
add_theme_support( 'align-wide' );
add_theme_support('post-thumbnails', array(
'post',
'page',
'custom-post-type-name',
));
}
add_action('after_setup_theme', 'mytheme_setup_theme_supported_features');
function wpb_password_post_filter( $where = '' ) {
if (!is_single() && !is_admin()) {
$where .= " AND post_password = ''";
}
return $where;
}
add_filter( 'posts_where', 'wpb_password_post_filter' );
add_filter( 'rest_allow_anonymous_comments', '__return_true' );
function change_excerpt_length($length) {
return 0;
}
add_filter('excerpt_length', 0);
add_filter('excerpt_more', null);
register_nav_menus(
array(
'menu-1' => __( 'Primary', 'twentynineteen' ),
'footer' => __( 'Footer Menu', 'twentynineteen' ),
'social' => __( 'Social Links Menu', 'twentynineteen' ),
)
);
?>