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' ); |
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_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
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
// 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
/************ Responsive Video *********/ | |
.video-container { | |
position: relative; | |
padding-bottom: 56.25%; | |
padding-top: 30px; | |
height: 0; | |
overflow: hidden; | |
} | |
.video-container iframe, | |
.video-container object, |
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 src="SHxP5Jd9Lm8" title="Rename Multiple Files Through Automator" duration="T6M18S" thumbnail="test.jpg" description="This is a test embed"] |
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
package callbyvalue; | |
public class PrimitiveCall { | |
public static void main(String[] args) { | |
int x = 10; | |
System.out.println("Value of x before the call: " + x); | |
add(x); | |
System.out.println("Value of x after the call: " + x); | |
} |
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
package callbyvalue; | |
public class ObjectCall { | |
public static void main(String[] args) { | |
TempNum z = new TempNum(10); | |
System.out.println("Value of x before the call: " + z); | |
add(z); | |
System.out.println("Value of x after the call: " + z); | |
} |
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
package callbyvalue; | |
public class ObjectCallWithCreate { | |
public static void main(String[] args) { | |
TempNum z = new TempNum(10); | |
System.out.println("Value of x before the call: " + z); | |
add(z); | |
System.out.println("Value of x after the call: " + z); | |
} |
OlderNewer