-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfunctions.php
45 lines (38 loc) · 1.1 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
<?php
/**
* PMDIGC 2020 Theme functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package pmdigc-twentytwenty
*/
add_action( 'wp_enqueue_scripts', 'pmdigc_twentytwenty_parent_theme_enqueue_styles' );
/**
* Enqueue scripts and styles.
*/
function pmdigc_twentytwenty_parent_theme_enqueue_styles() {
wp_enqueue_style( 'twentytwenty-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'pmdigc-twentytwenty-style',
get_stylesheet_directory_uri() . '/style.css',
array( 'twentytwenty-style' )
);
}
/**
* Removes the site description from the header
*
* @link https://developer.wordpress.org/reference/functions/__return_empty_string/
* @since 0.2.0
*/
add_filter( 'twentytwenty_site_description', '__return_empty_string' );
/**
* Removes the page title from the homepage
*
* @since 0.2.0
*/
add_filter( 'the_title', 'pmdigc_twentytwenty_singular_title' );
function pmdigc_twentytwenty_singular_title( $title ){
if ( is_front_page() && !is_page_template('templates/template-cover.php') ){
return '';
}
return $title;
}