This file contains 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 | |
function custom_excerpt($custom_excerpt__arg) { | |
global $post; | |
$raw_excerpt = $custom_excerpt__arg; | |
if ( '' == $custom_excerpt__arg ) { | |
$custom_excerpt__arg = get_the_content(''); | |
$custom_excerpt__arg = strip_shortcodes( $custom_excerpt__arg ); | |
$custom_excerpt__arg = apply_filters('the_content', $custom_excerpt__arg); | |
$custom_excerpt__arg = str_replace(']]>', ']]>', $custom_excerpt__arg); | |
// runs function to only allow certain tags in the excerpt |
This file contains 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_action('edit_form_after_title', function() { | |
global $post, $wp_meta_boxes; | |
do_meta_boxes(get_current_screen(), 'advanced', $post); | |
unset($wp_meta_boxes[get_post_type($post)]['advanced']); | |
}); |
This file contains 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 a custom post type with custom meta fields | |
*/ | |
// creates custom post type | |
function create__custom_post_type() { | |
$labels = array( | |
'name' => __( 'Custom_Post_Name' ), | |
'singular_name' => __( 'Custom_Post_Name' ), |
NewerOlder