-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
44 lines (40 loc) · 1.53 KB
/
functions.php
File metadata and controls
44 lines (40 loc) · 1.53 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
<?php
/**
* Dyna child functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package dyna-child
*/
/**
* This file is used to define custom functions. There are some commented things here to help you
* doing your own stuff, like overwriting or loading CSS and JS. If you do not need, you may also
* delete all commented stuff.
*
* We may soon strip out all these comments and hold them in an external file or Gist, but for now
* we think they are useful.
*
*/
/* Enable this function to remove Dyna or plugin stylesheet and scripts and enqueue your own
*
* @link https://codex.wordpress.org/Function_Reference/wp_dequeue_style
*
function dyna_remove_scripts() {
wp_dequeue_style( 'dyna-styles' );
wp_deregister_style( 'dyna-styles' );
wp_dequeue_script( 'dyna-scripts' );
wp_deregister_script( 'dyna-scripts' );
}
add_action( 'wp_enqueue_scripts', 'dyna_remove_scripts', 20 );
*/
/* Enqueue the parent stylesheet, use the commented lines to add more styles, if you need */
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
// $the_theme = wp_get_theme();
// wp_enqueue_style( 'child-styles', get_stylesheet_directory_uri() . '/style.css', array(), $the_theme->get( 'Version' ) );
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function add_child_textdomain() {
load_child_theme_textdomain( 'dyna-child', get_stylesheet_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'add_child_textdomain' );