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
// YouTube ShortCode [youtube src="" title="" duration="" thumbnail="" description=""] | |
function youtube_shortcode( $atts ) { | |
extract(shortcode_atts(array( | |
'src' => '', | |
'title' => '', | |
'duration' => '', | |
'thumbnail' => '', | |
'description' => '' | |
), $atts)); | |
$video_tag = '<div itemprop="video" itemscope itemtype="http://schema.org/VideoObject">'; |
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
function remove_author_box( $post_id ) { | |
// - Update the array for selected CPT, where you do not want to display the author box | |
$CPT = array('a'=>'Woocommerce', 'b'=>'WP Deals Engine'); | |
// If this isn't a selected CPT post, don't update it. | |
if ( in_array ($_POST['post_type'], $CPT )) { | |
// - Update the post's metadata. | |
update_post_meta( $post_id, 'author_disp', 'NO'); | |
} | |
} | |
add_action( 'save_post', 'remove_author_box'); |
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
add_action( 'genesis_entry_footer', 'metro_after_post' ); |
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
// Adds widget area before the .menu on #subnav | |
add_filter( 'genesis_do_subnav', 'child_do_subnav_widget', 10, 2 ); | |
function child_do_subnav_widget( $subnav_output, $subnav ){ | |
ob_start(); | |
genesis_widget_area( 'subnav-left', array( | |
'before' => '<div class="subnav-left widget-area">', | |
'after' => '</div>' | |
) ); | |
$widget_area = ob_get_clean(); |
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
add_theme_support( 'html5' ); |
NewerOlder