Skip to content

Instantly share code, notes, and snippets.

lw-na / dashboard-activity-cpt.php
Created Apr 2, 2021 — forked from Mte90/dashboard-activity-cpt.php
Add your cpts to the Widget Activity of the Dashboard in WordPress
View dashboard-activity-cpt.php
Plugin Name: Dashboard Widget Activity Custom Post Type
Plugin URI:
Author: Daniele Mte90 Scasciafratte
Version: 1.0.0
Author URI:
lw-na / functions.php
Created Aug 27, 2020 — forked from alexander-young/functions.php
Defer Javascript in WordPress
View functions.php
function defer_parsing_of_js($url)
if (is_admin()) return $url; //don't break WP Admin
if (false === strpos($url, '.js')) return $url;
if (strpos($url, 'jquery.js')) return $url;
return str_replace(' src', ' defer src', $url);
add_filter('script_loader_tag', 'defer_parsing_of_js', 10);
lw-na / basic-dropdown-usage.php
Created May 12, 2020 — forked from joshuadavidnelson/basic-dropdown-usage.php
Filter wp_dropdown_categories by post type.
View basic-dropdown-usage.php
* Using wp_dropdown_categories with the post type filter applied.
* @link
// Taxonomy dropdown arguments
$args = array(
'taxonomy' => 'department',