Disable wordpress from including jQuery in the head section
the following may work function wpdocs_dequeue_script() { wp_dequeue_script( ‘jquery’ ); } add_action( ‘wp_print_scripts’, ‘wpdocs_dequeue_script’, 100 );
the following may work function wpdocs_dequeue_script() { wp_dequeue_script( ‘jquery’ ); } add_action( ‘wp_print_scripts’, ‘wpdocs_dequeue_script’, 100 );
Technically possibly, but probably not worth the effort (and overhead). If you inspect the source with something like Developer Tools in Chrome, your HTML will be automatically indented. In fact, some caching plugins (like W3 Total Cache) even remove all whitespace to improve page load times. That said, if you want to ensure that your … Read more
You can see everything added to wp_head in the file /wp-includes/default-filters.php. If your theme supports the title tag, you can remove it entirely with remove_action: remove_action( ‘wp_head’, ‘_wp_render_title_tag’, 1 ); Though it may be simpler/better to use remove_theme_support( ‘title-tag’ ) in a child theme, which is what _wp_render_title_tag checks before outputting the title tag.
From Codex: <?php show_admin_bar( $bool ); ?>
Information attached to the wp_head action hook is echoed (if it needs to be echoed) as it occurs. There is no “wp_head” content string that you can search and replace. You will need to find the callback functions/methods for the data you are interested in manipulating and hope that there hooks built in that will … Read more
You can enqueue your own stylesheet by adding this to your child theme’s functions.php file: function wpa_custom_css(){ wp_enqueue_style( ‘wpa_custom’, get_stylesheet_directory_uri() . ‘/responsive.css’ ); } add_action( ‘wp_enqueue_scripts’, ‘wpa_custom_css’, 999 ); This will load the file responsive.css located in your child theme directory. The priority is set very low (999) so it is more likely to appear … Read more
There’s no filter that covers the entire output produced during wp_head(). You would have to use a fairly complicated process of output buffering starting before wp_head, then filtering out what you don’t want afterwards, before releasing the buffer. Lets assume that you’re dealing with plugins that have registered their scripts properly> Try adding this to … Read more
This are default settings fron WordPress. This was set via wp-includes/default_filters.php or the feed inside your theme. Check the theme, functions.php for add_theme_support( ‘automatic-feed-links’ ); and remove it. Add this via plugin or functions.php in your theme for remove the different defaults, hints and small description is on the source. remove_action( ‘wp_head’, ‘feed_links_extra’, 3 ); … Read more
You problem lies with how you are using wp_enqueue_script(). It does not print out the <script src=””></script>, instead it adds it to a list of Javascript files to printed out at the appropriate time. There is a different hook that is called for when you should add your Javascript and CSS: wp_enqueue_scripts (you use it … Read more
1.0.0? Really?! Anyway you could try the print_scripts_array filter: // Hack of wp_prototype_before_jquery() in “wp-includes/script-loader.php” function wpse157295_print_scripts_array( $js_array ) { if ( false === $jquery = array_search( ‘jquery-core’, $js_array, true ) ) // Now ‘jquery-core’, not ‘jquery’ return $js_array; $keys = array( ‘jquery.min’, ‘highcharts’, ‘exporting’ ); foreach ( $keys as $key ) { if ( … Read more