FavoriteLoadingAdd to favorites
  • Create these files first
    • functions.php
    • style.css
    • style-mobile.css
    • script.js
for functions.php
<?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

jQuery(document).ready(function( $ ) {
  console.log('Ready!');
}

for style.css

/*
Theme Name: Divi Child
Description: A dev site
Author: Garth Baker
Template: Divi
*/

for style-mobile.css

@media only screen and (max-width:600px) {
  /*--------------------------------*/
}

Pin It on Pinterest

Share This