Answer the question
In order to leave comments, you need to log in
Why can't I connect the admin panel in Wordpress?
There is a code in functions.php where styles and scripts are connected. I understand that after connecting Jquery, the admin panel should appear on top (this is Wordpress), but it does not appear.
I did everything according to the video, here is the link and the moment where it all happens:
https://www.youtube.com/watch?v=_s4Jwf1ba24&t=6610s
minute 2:03:19.
Here is the code itself:
<?php
add_action( 'wp_enqueue_scripts', 'timber_style' );
add_action( 'wp_enqueue_scripts', 'timber_scripts' );
function timber_style() {
wp_enqueue_style( 'normalize-style', get_template_directory_uri() . '/assets/css/normalize.css' );
wp_enqueue_style( 'magnific-style', get_template_directory_uri() . '/assets/css/magnific-popup.css' );
wp_enqueue_style( 'main-style', get_stylesheet_uri() );
}
function timber_scripts() {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', ' https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js' );
wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'magnific-script', get_template_directory_uri() . '/assets/js/jquery.magnific-popup.min.js', array(jquery), null, true );
wp_enqueue_script( 'main-script', get_template_directory_uri() . '/assets/js/main.js', array(jquery), null, true );
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question