Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* The idea (advanced version) of using Masonry in WordPress was taken from Sridhar Katakam's blog post (Link Below).
* Here we are applying the idea in a different way. In this specific scene, we only need the Masonry goodness on Main Page.
* Link - http://sridharkatakam.com/using-masonry-genesis-pinterest-like-layout/
*
* NOTE: Here we did not use Masonry Brick for Image and CSS, as done in Sridhar's Tutorial. As, we already done some css
* work for .entry and gave it a fixed width; and images in this scene were not featured images or images directly fom post.
*
<?php
add_action('genesis_after_header','portfolio_title');
function portfolio_title() { ?>
<div class="portfolio-title">
<div class="wrap">
<h1 class="entry-title" itemprop="headline">
<span class="portfolio-headline">Portfolio » </span>
<?php the_title(); ?>
</h1>
<?php
/**
* Template Name: Filterable Portfolio
*
* By Sridhar Katakam (http://sridharkatakam.com) based on Adapt Theme (http://www.wpexplorer.com/adapt-free-responsive-wordpress-theme/)
*/
?>
<?php
<?php
/**
* Template Name: Office Hours Template
* Description: Used as a page template to show page contents, followed by a loop
* through the "Genesis Office Hours" category
*/
// Add our custom loop
add_action( 'genesis_loop', 'cd_goh_loop' );
<?php
add_action( 'genesis_loop', 'be_custom_loop' );
remove_action( 'genesis_loop', 'genesis_do_loop' );
function be_custom_loop() {
global $post;
// arguments, adjust as needed
$args = array(
<?php //* Mind this opening PHP tag
//* Reposition Page Title
add_action( 'genesis_before', 'centric_post_title' );
function centric_post_title() {
if ( is_page() and !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 );
<?php
add_filter( 'widget_title', 'custom_widget_title', 10, 3 );
/**
* Callback for WordPress 'widget_title' filter.
*
* Create a link for the title of the Genesis Featured Widget if a category is
* specified.
*
* @package WordPress
<?php
/**
* Set up the Grid Loop
* @author Bill Erickson
* @link http://www.billerickson.net/genesis-grid-loop-content/
*
*/
function child_grid_loop_helper() {
$args = array(
'features' => 2,
//* Replace the standard loop with our custom loop
//* props to David Wang, he is the man!
// @author David Wang
// @link http://genesissnippets.com/genesis-custom-loop/
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'child_do_sticky_post', 5 );
function child_do_sticky_post() {
//* Replace the standard loop with our custom loop
//* props to David Wang, he is the man!
// @author David Wang
// @link http://genesissnippets.com/genesis-custom-loop/
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'child_do_sticky_post', 5 );
function child_do_sticky_post() {