Created
March 17, 2023 12:37
-
-
Save cdsaenz/ab9a6a46dba468c5e904d3b4d434daea to your computer and use it in GitHub Desktop.
Hello Elementor Child With Bootstrap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Hello Elementor child theme | |
* Version 1.0 march 2023 | |
* CSDev | |
*/ | |
require_once get_stylesheet_directory() . '/includes/slider.php'; | |
/** | |
* Parent enqueuing | |
*/ | |
add_action('wp_enqueue_scripts', 'csdev_elementor_enqueue_styles'); | |
function csdev_elementor_enqueue_styles() | |
{ | |
wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css'); | |
} | |
/** | |
* Child enqueue bootstrap | |
*/ | |
add_action('wp_enqueue_scripts', 'csdev_bootstrap_enqueue'); | |
function csdev_bootstrap_enqueue() | |
{ | |
$assets_dir = get_stylesheet_directory_uri() . '/assets/vendor/bootstrap'; | |
wp_register_style('bootstrap-style', $assets_dir . '/css/bootstrap.min.css'); | |
wp_register_script('bootstrap-script', $assets_dir . '/js/bootstrap.bundle.min.js',[],'5.2.3',true); | |
wp_enqueue_style('bootstrap-style', 'bootstrap-style'); | |
wp_enqueue_script('bootstrap-script', 'bootstrap-script'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment