This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'after_setup_theme', function() { | |
| add_theme_support( 'editor-color-palette', array( | |
| array( | |
| 'name' => __( 'one' ), | |
| 'slug' => 'one', | |
| 'color' => '#000000', | |
| ), | |
| array( | |
| 'name' => __( 'two' ), | |
| 'slug' => 'two', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //Remove "Event" custom post type from a WordPress site. This example uses CPT named "event." | |
| function delete_event_cpt(){ | |
| unregister_post_type( 'event' ); | |
| } | |
| add_action('init','delete_event_cpt', 9999); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Add to existing function.php file | |
| // Disables support for comments and trackbacks in post types | |
| function ewk_disable_comments_post_types_support() { | |
| $post_types = get_post_types(); | |
| foreach ($post_types as $post_type) { | |
| if(post_type_supports($post_type, 'comments')) { |