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 | |
/* 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/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 | |
/* 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
<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
<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
<?php | |
/* @link https://anythinggraphic.net/change-entry-title-post-links-archives-genesis/ | |
/* Change the link on the entry-title for each post to a custom one on Archives page | |
----------------------------------------------------------------------------------------*/ | |
add_filter( 'genesis_post_title_output', 'ag_custom_post_title_link' ); | |
function ag_custom_post_title_link( $title ) { | |
if( is_archive() ) { | |
$post_title = get_the_title( get_the_ID() ); | |
$title = '<h2 class="entry-title" itemprop="headline"><a href="' . get_field('link') . '" target="new">' . $post_title . '</a></h2>'; |
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 | |
/* Put a unique ID on Gravity Form (single form ID) entries. | |
----------------------------------------------------------------------------------------*/ | |
add_filter("gform_field_value_uuid", "get_unique"); | |
function get_unique(){ | |
$prefix = "SLP2017-"; // update the prefix here | |
do { |
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/paste-as-text-by-default-in-wordpress | |
/* Use Paste As Text by default in the editor | |
----------------------------------------------------------------------------------------*/ | |
add_filter('tiny_mce_before_init', 'ag_tinymce_paste_as_text'); | |
function ag_tinymce_paste_as_text( $init ) { | |
$init['paste_as_text'] = true; | |
return $init; | |
} |
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
# https://anythinggraphic.net/disable-emojis-in-wordpress-without-a-plugin | |
# BEGIN GZIP COMPRESSION | |
<IfModule mod_deflate.c> | |
# Compress HTML, CSS, JavaScript, Text, XML and fonts | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
AddOutputFilterByType DEFLATE application/x-font | |
AddOutputFilterByType DEFLATE application/x-font-opentype | |
AddOutputFilterByType DEFLATE application/x-font-otf |