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
<script>var v = document.getElementById("movie"); | |
v.onclick = function() { | |
v.paused ? v.play() : v.pause() | |
};</script> |
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
<script>var video= jQuery("#hero-movie")[0]; | |
var videoJ= jQuery("#hero-movie"); | |
videoJ.on("ended",function(){ | |
video.load(); | |
});</script> |
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 "Read More" link to hand-crafted excerpts | |
----------------------------------------------------------------------------------------*/ | |
add_filter('get_the_excerpt', 'ag_manual_excerpt_read_more_link'); | |
function ag_manual_excerpt_read_more_link($excerpt) { | |
$excerpt_more = ''; | |
if (has_excerpt() && ! is_attachment() && get_post_type() == 'post') { | |
$excerpt_more = ' <a href="' . get_permalink() . '">[Continue reading] <span class="screen-reader-text">' . get_the_title() . '</span></a>'; | |
} |
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 | |
/* @link https://anythinggraphic.net/change-wordpress-admin-login-logo-image-url/ | |
/* Change login logo and link | |
----------------------------------------------------------------------------------------*/ | |
add_filter('login_headerurl','ag_login_link'); | |
function ag_login_link() { | |
return home_url(); | |
} |
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 | |
/* Move Post Title and Post Info from inside Entry Header to Entry Content on Posts page | |
----------------------------------------------------------------------------------------*/ | |
add_action( 'genesis_before_entry', 'reposition_entry_header' ); | |
function reposition_entry_header() { | |
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 ); | |
remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); | |
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 ); |
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 | |
/* @link https://anythinggraphic.net/header-image-logo-in-genesis-and-wordpress-with-a-retina-2x-version/ | |
/* Override Header Image (Appearance > Customize) with an @2x version | |
----------------------------------------------------------------------------------------*/ | |
add_theme_support( 'custom-header', array( | |
'header_image' => '', | |
'header-selector' => '.site-title a', | |
'header-text' => false, | |
'height' => 188, |
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 | |
/* @link https://anythinggraphic.net/disable-emojis-in-wordpress-without-a-plugin | |
/* Remove emoji scripts and dns prefetch | |
----------------------------------------------------------------------------------------*/ | |
add_action( 'init', 'ag_disable_wp_emojicons' ); | |
function ag_disable_wp_emojicons() { | |
// all actions related to emojis | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); |
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 | |
/* @link https://anythinggraphic.net/change-navigation-menu-item-url-itemtype-schema-microdata/ | |
/* Change microdata for specific menu items | |
----------------------------------------------------------------------------------------*/ | |
add_filter( 'nav_menu_link_attributes', 'ag_menu_item_attributes', 10, 3 ); | |
function ag_menu_item_attributes( $atts, $item, $args ) { | |
// The ID of the target menu item | |
// Remove this to target all menu items | |
$menu_target = 123; |
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 | |
/* @link https://anythinggraphic.net/allow-shortcodes-in-author-box-for-genesis/ | |
/* Allow shortcodes in the Author Box for users | |
----------------------------------------------------------------------------------------*/ | |
add_filter( 'genesis_author_box', 'do_shortcode', 20 ); |
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 | |
/* @link https://anythinggraphic.net/change-class-id-itemtype-and-other-attributes-in-genesis/ | |
/* Change microdata for Article with the class 'entry' in Genesis child themes | |
----------------------------------------------------------------------------------------*/ | |
add_filter( 'genesis_attr_entry', 'ag_article_attributes', 20 ); | |
function ag_article_attributes( $attributes ) { | |
if( is_singular( 'leadership' ) ) { | |
// class, id, itemscope, itemtype, etc. | |
$attributes['itemtype'] = 'http://schema.org/Organization'; |