ThePixelMe

wp support - expandable/collapsible posts - functions.php

Mar 19th, 2016
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.67 KB | None | 0 0
  1. <?php
  2. // Exit if accessed directly
  3. if ( !defined( 'ABSPATH' ) ) exit;
  4.  
  5. // Enqueue parent
  6.  
  7. if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
  8.     function chld_thm_cfg_parent_css() {
  9.         wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css' );
  10.     }
  11. endif;
  12. add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css' );
  13.  
  14.  
  15. // Enqueue child scripts
  16.  
  17. function my_scripts_method() {
  18.     wp_enqueue_script(
  19.         'custom-script',
  20.         get_stylesheet_directory_uri() . '/custom.js',
  21.         array( 'jquery' ),
  22.         '1.0',
  23.         true
  24.     );
  25. }
  26.  
  27. add_action( 'wp_enqueue_scripts', 'my_scripts_method' );
Advertisement
Add Comment
Please, Sign In to add comment