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
add_filter( 'post_class', 'be_first_post_class' ); | |
/** | |
* First Post Class | |
* Adds a class of 'first' to the first post | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/code/first-post-class | |
* | |
* @param array $classes | |
* @return array |
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_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 php tag | |
// register sidebar for the middle of the posts in home or archive page | |
genesis_register_sidebar( array( | |
'id' => 'sidebar-somewhere-in-the-posts', | |
'name' => __( 'Middle of Posts Widget Area' ), | |
'description' => __( 'Display widgets in the middle of your posts on the home or archive pages.' ), | |
) ); |
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
add_action( 'genesis_before_post' , 'wps_no_featured_image' ); | |
add_action( 'genesis_after_post_content' , 'wps_no_featured_image' ); | |
/* | |
* Remove featured image from certain posts. | |
* | |
* Stops featured image from displayed on the Small Group Show category (126) on | |
* the blog page. | |
* | |
* @author Travis Smith | |
* @link http://wpsmith.net/2012/genesis/how-to-hide-the-featured-image-of-a-specific-category-on-the-blog-page-in-genesis/ |
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
/* Same as other file, but with extra notes */ | |
/* Embedded Gists */ | |
.line-code::before, | |
.line-code::after, | |
.line::before, | |
.line::after { | |
content: ''; /* Fixes addition of float-clearing space added to before and after global pre and div elements */ | |
} |
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
// Customize the post info function | |
add_filter( 'genesis_post_info', 'post_info_filter' ); | |
function post_info_filter($post_info) { | |
$post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit]'; | |
return $post_info; | |
} | |
// Remove the post info function | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); |
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
/** | |
* Filter Genesis H1 Post Titles to add <span> for styling | |
* | |
*/ | |
add_filter( 'genesis_post_title_output', 'filter_genesis_post_title_tags', 15 ); | |
function filter_genesis_post_title_tags( $title ) { | |
if ( is_singular() ) | |
$title = sprintf( '<h1 class="entry-title"><span>%s</span></h1>', apply_filters( 'genesis_post_title_text', get_the_title() ) ); |