Posted By

LeslieM on 06/15/16


Tagged

php functions theme child Divi


Versions (?)

Divi- Child Theme- functions.php


 / Published in: PHP
 

This is the recommended best practice for incorporating the Divi parent theme (calling the styles.)

  1. <?php
  2. //
  3. // This is the best practice for calling the parent theme styles.
  4. //
  5. add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
  6. function theme_enqueue_styles() {
  7. wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
  8. wp_enqueue_style( 'child-style',
  9. get_stylesheet_directory_uri() . '/style.css',
  10. array('parent-style')
  11. );
  12. }

Report this snippet  

You need to login to post a comment.