FavoriteLoadingAdd to favorites
  • Create these files first
    • functions.php
    • style.css
    • style-mobile.css
    • script.js
for functions.php
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<?php
function my_theme_enqueue_styles() {
$parent_style = '../Divi';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-styles', get_stylesheet_directory_uri() . '/style.css');
wp_enqueue_style( 'child-style-mobile', get_stylesheet_directory_uri() . '/style-mobile.css');
wp_enqueue_script('child-scripts', get_template_directory_uri() . '/script.js' );
}
add_action("wp_enqueue_scripts","my_theme_enqueue_styles");
?>
<?php function my_theme_enqueue_styles() { $parent_style = '../Divi'; wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-styles', get_stylesheet_directory_uri() . '/style.css'); wp_enqueue_style( 'child-style-mobile', get_stylesheet_directory_uri() . '/style-mobile.css'); wp_enqueue_script('child-scripts', get_template_directory_uri() . '/script.js' ); } add_action("wp_enqueue_scripts","my_theme_enqueue_styles"); ?>
<?php
  function my_theme_enqueue_styles() {
    $parent_style = '../Divi';
    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );

    wp_enqueue_style( 'child-styles', get_stylesheet_directory_uri() . '/style.css');
    wp_enqueue_style( 'child-style-mobile', get_stylesheet_directory_uri() . '/style-mobile.css');

    wp_enqueue_script('child-scripts', get_template_directory_uri() . '/script.js' );
  }
add_action("wp_enqueue_scripts","my_theme_enqueue_styles");
?>

for script.js

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
jQuery(document).ready(function( $ ) {
console.log('Ready!');
}
jQuery(document).ready(function( $ ) { console.log('Ready!'); }
jQuery(document).ready(function( $ ) {
  console.log('Ready!');
}

for style.css

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
/*
Theme Name: Divi Child
Description: A dev site
Author: Garth Baker
Template: Divi
*/
/* Theme Name: Divi Child Description: A dev site Author: Garth Baker Template: Divi */
/*
Theme Name: Divi Child
Description: A dev site
Author: Garth Baker
Template: Divi
*/

for style-mobile.css

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
@media only screen and (max-width:600px) {
/*--------------------------------*/
}
@media only screen and (max-width:600px) { /*--------------------------------*/ }
@media only screen and (max-width:600px) {
  /*--------------------------------*/
}

Pin It on Pinterest

Garth Baker
Favorite
Loading
en
af
sq
am
ar
hy
az
eu
be
bn
bs
bg
ca
ceb
ny
zh-CN
zh-TW
co
hr
cs
da
nl
en
eo
et
tl
fi
fr
fy
gl
ka
de
el
gu
ht
ha
haw
iw
hi
hmn
hu
is
ig
id
ga
it
ja
jw
kn
kk
km
ko
ku
ky
lo
la
lv
lt
lb
mk
mg
ms
ml
mt
mi
mr
mn
my
ne
no
ps
fa
pl
pt
pa
ro
ru
sm
gd
sr
st
sn
sd
si
sk
sl
so
es
su
sw
sv
tg
ta
te
th
tr
uk
ur
uz
vi
cy
xh
yi
yo
zu
Share This