Skip to content

Instantly share code, notes, and snippets.

<?php
/*
Template Name: Novels
*/
/** Remove Post Meta and Post Info */
remove_action( 'genesis_before_post_content', 'genesis_post_info' );
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
/** Add Novels body class */
<?php
//* Do NOT include the opening php tag
// =================================================================
// = Pinterest-like Masonry layout for Posts page and Archives =
// =================================================================
//* Enqueue and initialize jQuery Masonry script
function sk_masonry_script() {
if (is_home() || is_archive()) {
remove_action( 'genesis_after_endwhile', 'genesis_posts_nav' );
<?php //* Mind this opening PHP tag
function centric_open_post_title() {
echo '<div class="page-title"><div class="wrap">';
}
function centric_close_post_title() {
echo '</div></div>';
}
<?php //* Mind this opening PHP tag
//* Reposition Page Title
add_action( 'genesis_before', 'centric_post_title' );
function centric_post_title() {
if ( is_page() && !is_page_template() ) {
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
add_action( 'genesis_after_header', 'centric_open_post_title', 1 );
add_action( 'genesis_after_header', 'genesis_do_post_title', 2 );
//* Add new image size
add_image_size( 'home-featured-image', 680, 0, true );
add_action( 'pre_get_posts', 'sk_set_posts_per_page_home' );
/**
* Change Posts Per Page for Event Archive
*
* @author Bill Erickson
* @link http://www.billerickson.net/customize-the-wordpress-query/
* @param object $query data
<?php
/**
* Controls the "Portfolio" Category archive page output.
*/
//* Force full width content
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
/**
<?php
/**
* Template Name: Featured Image Blog Template
* Description: Use with query_args to show the featured medium image only of all called posts/pages.
* @author Robin Cornett
* @package Lookout 2013
*/
remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop
add_action( 'genesis_loop', 'genesis_standard_loop', 5 ); // show the editor content
<?php
/**
* To display entries from a Custom Post Type on site's front page in a 3-column responsive grid.
* URL: http://sridharkatakam.com/front-page-template-to-show-cpt-entries-in-a-3-column-grid-in-genesis/
*/
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'sk_do_loop' );
/**
<?php
//* Start the engine
include_once( get_template_directory() . '/lib/init.php' );
//* Child theme (do not remove)
define( 'CHILD_THEME_NAME', 'Genesis Sample Theme' );
define( 'CHILD_THEME_URL', 'http://www.studiopress.com/' );
define( 'CHILD_THEME_VERSION', '2.0.1' );
//* Enqueue Lato Google font