Forum Replies Created
Viewing 1 post (of 1 total)
-
AuthorPosts
-
Josue, when I put this code to functions.php, the site goes down.
I used thisif ( !is_admin() ) { remove_action('wp_head','wp_print_scripts'); remove_action('wp_head','wp_print_head_scripts',9); remove_action('wp_head','wp_enqueue_scripts',1); add_action('wp_footer','wp_print_scripts',5); add_action('wp_footer','wp_enqueue_scripts',5); add_action('wp_footer','wp_print_head_scripts',5); wp_deregister_script('jquery'); wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"), false, '1.12.4', true); wp_enqueue_script('jquery'); }
but somehow it makes .css go to footer as well. Then I just commented this chunk in functions.php (and set up new minimized .css in header.php)
//wp_register_style( 'avia-custom', $template_url."/css/custom.css", array(), '2', 'all' ); //wp_enqueue_style( 'avia-grid' , $template_url."/css/grid.css", array(), '2', 'all' ); //wp_enqueue_style( 'avia-base' , $template_url."/css/base.css", array(), '2', 'all' ); //wp_enqueue_style( 'avia-layout', $template_url."/css/layout.css", array(), '2', 'all' ); //wp_enqueue_style( 'avia-scs', $template_url."/css/shortcodes.css", array(), '2', 'all' ); //wp_enqueue_style( 'avia-popup-css', $template_url."/js/aviapopup/magnific-popup.css", array(), '1', 'screen' ); //wp_enqueue_style( 'avia-media' , $template_url."/js/mediaelement/skin-1/mediaelementplayer.css", array(), '1', 'screen' ); //wp_enqueue_style( 'avia-print' , $template_url."/css/print.css", array(), '1', 'print' );
…and it helped. Now I’ve got scripts in my >footer>, styles in my >head> and normal headers without js.
-
AuthorPosts
Viewing 1 post (of 1 total)