Indenting (tabbing) WP_head

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

How can i remove JUST the title tag from wp_head() function?

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.

Manipulating wp_head content

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

How can I make new .css file in child theme override styles in child theme’s style.css

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

wp_head() remove redundant scripts?

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

How to remove unnecessary elements in the HTML document head

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

How to load plugin before the wordpress jquery?

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)