Skip to content

Instantly share code, notes, and snippets.

View maljones's full-sized avatar
🎯
Focusing

Mal Jones maljones

🎯
Focusing
View GitHub Profile
@maljones
maljones / gist:3946e25a96e37746c5247aa26c01bf79
Created August 13, 2021 00:55
Disable duotone control in WP
// Disable duotone
add_filter(
'block_editor_settings',
function ($editor_settings) {
$editor_settings['__experimentalFeatures']['color']['customDuotone'] = false;
$editor_settings['__experimentalFeatures']['color']['duotone'] = false;
return $editor_settings;
}
);
@maljones
maljones / gist:05f1be399ce146147efe8c52fe1c4deb
Created November 10, 2016 18:58
WordPress Parent/Child Nav
/**
* Generate Parent/Child Page Menus
* @link https://codex.wordpress.org/Function_Reference/wp_list_pages
*/
function print_menu_child_pages(){
$children = '<nav class="nav-children nav-section"><ul id="menu-section">';
global $post;