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: Test */ | |
/** | |
* Genesis custom loop | |
*/ | |
function be_custom_loop() { | |
global $post; | |
// arguments, adjust as needed |
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 | |
/** | |
* Archive Post Class | |
* @since 1.0.0 | |
* | |
* Breaks the posts into three columns | |
* @link http://www.billerickson.net/code/grid-loop-using-post-class | |
* | |
* @param array $classes |
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
// Remove comments from posts | |
remove_action( 'genesis_after_post', 'genesis_get_comments_template' ); | |
// Add comments back in if conditions are met | |
add_action( 'genesis_after_post', 'cd_conditional_comments' ); | |
function cd_conditional_comments() { | |
// Conditional Reference http://codex.wordpress.org/Function_Reference/get_the_author | |
if ('Author Display Name' == get_the_author() ) { | |
genesis_get_comments_template(); |
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: Testimonial Archives | |
* Description: Used as a page template to show page contents, followed by a loop through a CPT archive | |
*/ | |
remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop | |
add_action( 'genesis_loop', 'custom_do_grid_loop' ); // Add custom loop |
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 | |
//* Do NOT include the opening php tag | |
//* Load Lato and Merriweather Google fonts | |
add_action( 'wp_enqueue_scripts', 'custom_load_google_fonts' ); | |
function custom_load_google_fonts() { | |
wp_enqueue_style( 'google-font', 'http://fonts.googleapis.com/css?family=Lato:300,400|Merriweather:300,400', array(), PARENT_THEME_VERSION ); | |
} |
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 | |
// Removee "Protected" and "Private" from Protected and Private Posts | |
function afn_title_trim($title) { | |
$title = attribute_escape($title); | |
$findthese = array( | |
'#Protected: #', // Notice the blank space after Protected: | |
'#Private: #' // Notice again, otherwise the title get pushed. | |
); |
NewerOlder