Skip to content

Instantly share code, notes, and snippets.

@guillermorangel
Created December 4, 2013 19:53
Show Gist options
  • Save guillermorangel/7794374 to your computer and use it in GitHub Desktop.
Save guillermorangel/7794374 to your computer and use it in GitHub Desktop.
Cleanup the WordPress, free of stuff that we done need. Additonal code for woothemes child theme stylesheet load re-order
<?php
// Remove WP Stuff from the head
remove_action( 'wp_head', 'rsd_link' );
remove_action( 'wp_head', 'wlwmanifest_link' );
remove_action( 'wp_head', 'wp_generator' );
remove_action( 'wp_head', 'start_post_rel_link', 10, 0 );
remove_action( 'wp_head', 'index_rel_link' );
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
remove_action( 'wp_head', 'wp_shortlink_wp_head' );
remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );
//Remove WooThemes stuff and stylesheets from the head for later reorganization
function woo_head_css() { /* Void is bliss */ }
function woo_google_webfonts() { /* Void is bliss */}
function woo_output_custom_css() { /* Void is bliss */ }
function woo_shortcode_stylesheet() { /* Void is bliss */ }
function woo_output_alt_stylesheet() { /* Void is bliss */ }
function remove_woo_generator() {
remove_action( 'wp_head', 'woo_version');
} add_action('after_setup_theme','remove_woo_generator');
// Reload stylesheets in the order that we please
function woo_load_frontend_css () {
wp_register_style( 'theme-stylesheet', get_stylesheet_uri() );
wp_register_style( 'woo-layout', get_template_directory_uri() . '/css/layout.css' );
wp_register_style( 'shortcodes', get_template_directory_uri() . '/functions/css/shortcodes.css' );
wp_register_style( 'bss-custom', get_stylesheet_directory_uri() . '/includes/css/bss.css' );
wp_enqueue_style( 'theme-stylesheet' );
wp_enqueue_style( 'woo-layout' );
wp_enqueue_style( 'shortcodes' );
wp_enqueue_style( 'bss-custom' );
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment