Skip to content

Instantly share code, notes, and snippets.

View scubbae's full-sized avatar

Jerry Ellis scubbae

View GitHub Profile
@scubbae
scubbae / functions.php
Created December 12, 2022 18:28 — forked from schilke/functions.php
How to load CSS files asynchronously in WordPress (using Scott Jehl's "loadCSS")
<?php
// This is the cleaner code per request of a thread in the LinkedIn group "WordPress"
// ...
// register and enqueue loadCSS
function load_scripts_and_styles() {
// register loadCSS
wp_register_script( 'load-css-async', get_stylesheet_directory_uri() . '/path/to/js/loadCSS.js', array(), '', false );
@scubbae
scubbae / wp-remove-posts-type
Created November 23, 2022 13:52 — forked from blakemiller99/wp-remove-posts-type
Remove Posts from WordPress
// ************* Remove default Posts type since no blog *************
// Remove side menu
add_action( 'admin_menu', 'remove_default_post_type' );
function remove_default_post_type() {
remove_menu_page( 'edit.php' );
}
// Remove +New post in top Admin Menu Bar