Home wordpress WP_FOOTER ()





The site shows and works WP_HEAD () but WP_FOOTER () is not displayed

& lt;? PHP WP_FOOTER (); ? & gt; & lt; / body & gt; & lt; / html & gt;

Here is the index.php file

Add_action ('WP-Footer', 'scripts_theme');
Function scripts_theme () {
  WP_ENQUEUE_STYLE ('SLICK', Get_Template_Directory_uri (). '/Ssets/slick/slick.css');
  WP_ENQUEUE_STYLE ('SLICK-THEME', GET_TEMPLATE_DIRECTORY_URI (). '/Ssets/slick/slick-Theme.css');
  WP_ENQUEUE_Script ('BT', Get_Template_Directory_uri (). '/Ssets/js/bootstrap.min.js');
  WP_ENQUEUE_Script ('Calc', get_template_directory_uri (). '/Ssets/js/calc.js');
  WP_ENQUEUE_Script ('Mask', Get_Template_Directory_uri (). '/Ssets/js/jquery.maskInput.min.js');
  WP_ENQUEUE_Script ('WOW', Get_Template_Directory_uri (). '/Ssets/js/wow.min.js');
  WP_ENQUEUE_Script ('Slick', get_template_directory_uri (). '/Ssets/slick/slick.js');

That’s what the hell in function.php
Help please with the problem

Answer 1, Authority 100%

may be able to change the WP-Footer on WP_FOOTER in the Add_action function?


add_action ('WP-Footer', 'scripts_theme');


add_action ('WP_FOOTER', 'scripts_theme');

Answer 2, Authority 100%

You do not propen the scripts correctly. Scripts and styles should connect to Hook WP_ENQUEUE_Scripts . Also, if you want the scripts to be connected in a footer, then you must specify the last True parameter. Read more In the documentation: https://wp-kama.ru/function/wp_enqueue_script

add_action ('WP_ENQUEUE_Scripts', 'scripts_theme');
Function scripts_theme () {
  WP_ENQUEUE_Script ('NewScript', Get_Template_Directory_uri (). '/js/custom_script.js', [], True); // True - says that you need to connect scripts in the footer. (Only works for scripts)

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions