This file contains hidden or 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 | |
// don't use | |
/** ====================================================================================== | |
* | |
* Read More the_content_more_link | |
* Check for the default <!--more--> and change it | |
* but leave custom <!--more Custom Text--> alone | |
* | |
======================================================================================= */ |
This file contains hidden or 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 | |
/* Template Name: Featured Blog with excerpts */ | |
/** | |
* Excerpt Length | |
* | |
*/ | |
function be_custom_excerpt_length( $length ) { | |
return 50; |
This file contains hidden or 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 | |
//don't include this | |
/** ==================================================================================== | |
* Break more link outside the paragraph in the loop on all archives (home, archives, search, etc) | |
==================================================================================== **/ | |
function yourprefix_excerpt_more_link() { |
This file contains hidden or 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 //<~ Remove me | |
//Removes Title and Description on CPT Archive | |
remove_action( 'genesis_before_loop', 'genesis_do_cpt_archive_title_description' ); | |
//Removes Title and Description on Blog Archive | |
remove_action( 'genesis_before_loop', 'genesis_do_posts_page_heading' ); | |
//Removes Title and Description on Date Archive | |
remove_action( 'genesis_before_loop', 'genesis_do_date_archive_title' ); | |
//Removes Title and Description on Archive, Taxonomy, Category, Tag | |
remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); |
This file contains hidden or 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 defer_js_async($tag){ | |
// scripts to defer. | |
$scripts_to_defer = array('script-name1.js', 'script-name2.js', 'script-name3.js'); | |
// scripts to async. | |
$scripts_to_async = array('script-name1.js', 'script-name2.js', 'script-name3.js'); | |
foreach($scripts_to_defer as $defer_script){ |
This file contains hidden or 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 | |
// Tell Yoast Google Analytics plugin not to be at the top of the WP admin menu | |
add_filter( 'wpga_menu_on_top', '__return_false' ); | |
// Disable additional WPSEO columns from the admin | |
add_filter( 'wpseo_use_page_analysis', '__return_false' ); | |
/** | |
* Set WPSEO metabox to low so custom fields can appear above it |
This file contains hidden or 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 | |
/** | |
* Disable visual TinyMCE editor for specifc page/post | |
* | |
* @since 1.0.0 | |
*/ | |
function ja_disable_fancy_editor( $can ) { | |
global $post; | |
if ( 3441 == $post->ID ) { |
This file contains hidden or 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 | |
/** | |
* Set default Genesis images | |
* | |
* @since 1.0.0 | |
* @param string $output | |
* @param array $args | |
* @return array | |
*/ | |
function ja_default_genesis_image( $output, $args ) { |
This file contains hidden or 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 | |
/** | |
* Plugin Name: Cron Test | |
* Plugin URI: https://gist.github.com/A5hleyRich/6de1712ce5f46662c8ba | |
* Description: WordPress cron and email test. | |
* Author: Ashley Rich | |
* Version: 1.0 | |
* Author URI: http://ashleyrich.com | |
*/ |