CSS,JS files include but not working in widget.php, elementor addon
-
I made an elementor addon, there included css,js,bootstrap,fontawesome files, but files not working. In console option shows 403,404,500 forbidden error. Image dont show in html tag. I added everything properly.What’s going wrong? Please help.
HTML code in widget.php :
protected function render() { $settings = $this->get_settings_for_display(); ?> <div class="container"> <div class="row"> <div class="col-md-3 col-sm-6"> <div class="our-team"> <div class="pic"> <img src="img/contact-bg.jpg" alt=""> </div> <div class="team-prof"> <h3 class="post-title">Williamson</h3> <span class="post">Web Desginer</span> <ul class="team_social"> <li><a href="#"><i class="fab fa-facebook"></i></a></li> <li><a href="#"><i class="fab fa-twitter"></i></a></li> <li><a href="#"><i class="fab fa-google-plus"></i></a></li> <li><a href="#"><i class="fab fa-pinterest"></i></a></li> </ul> <p class="description"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sit amet ipsum ut quam faucibus dictum a sit amet lorem. </p> </div> </div> </div> </div> </div> <?php }
Files including method:
public function load_rhx_scripts(){ wp_enqueue_script('jquery'); wp_enqueue_script('bootstrap-min-js', plugins_url( 'js/bootstrap.min.js', __FILE__ ), array(), '1.0.0', true ); wp_enqueue_script('jquery-js', plugins_url( 'js/jquery-3.6.0.min.js', __FILE__ ), array(), '1.0.0', true ); wp_enqueue_script('main-js', plugins_url( 'js/mainnn.js', __FILE__ ), array(), '1.0.0', true ); wp_enqueue_script('wow-js', plugins_url( 'js/wow.js', __FILE__ ), array(), '1.0.0', true ); wp_enqueue_script('owl-js', plugins_url( 'js/owl.carousel.min.js', __FILE__ ), array(), '1.0.0', true ); wp_enqueue_style('bootstrap-min', plugins_url( 'css/bootstrao.min.css', __FILE__ ), array(), '1.0.0' ); wp_enqueue_style('owl-carousel-min', plugins_url( 'css/owl.carousel.min.css', __FILE__ )); wp_enqueue_style('main-css', plugins_url( 'css/stylesheet.css', __FILE__ )); wp_enqueue_style('font-awesome'); }
Method initialize function:
public function __construct() {
// Register widget style
add_action( ‘wp_enqueue_scripts’, [ $this, ‘load_rhx_scripts’ ] );
}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘CSS,JS files include but not working in widget.php, elementor addon’ is closed to new replies.