Skip to content

Instantly share code, notes, and snippets.

<?php
// Remove the post info function
remove_action('genesis_before_post_content', 'genesis_post_info');
remove_action('genesis_after_post_content', 'genesis_post_meta');
// Remove post comments
remove_action('genesis_after_post_content', 'genesis_post_comments');
//add meta boxes
add_action( 'genesis_post_content' , 'wps_do_pitbull_sire' );
// Filter the title with a custom function
add_filter('genesis_seo_title', 'wap_site_title' );
// Add additional custom style to site header
function wap_site_title( $title ) {
// Change $custom_title text as you wish
$custom_title = '<span class="custom-title">WA</span>Estate';
// Don't change the rest of this on down
<?php
/**
* Portfolio Archive
*
*/
/**
* Display as Columns
*
*/
@jamiemitchell
jamiemitchell / CPT $arg
Last active August 29, 2015 14:25 — forked from media317/CPT $arg
<?php
/**
* The custom Projects post type single post template
*/
/** Remove standard Genesis Loop */
remove_action( 'genesis_loop' , 'genesis_do_loop' );
/** Add custom loop for Portfolio page */
add_action( 'genesis_loop', 'me_portfolio' );
@jamiemitchell
jamiemitchell / masonry-scroll.php
Last active August 27, 2015 08:13 — forked from frankschrijvers/masonry-scroll.php
Masonry with Infine scroll page template
<?php
/*
Template Name: Masonry Grid Scroll
*/
/*
* @author Frank Schrijvers
* @link https://www.wpstud.io
*/
@jamiemitchell
jamiemitchell / functions.php
Last active September 11, 2015 01:19 — forked from robincornett/functions.php
on a site set to show the full content of each post (due to Tribe events calendar), set page_blog.php to return the featured image and content limit.
<?php
add_action ( 'genesis_entry_content' , 'rgc_blog_page' );
function rgc_blog_page () {
if ( !is_page ( array( 'pastors' , 'sermons' ) ) && is_page_template( 'page_blog.php' ) ) {
remove_action ( 'genesis_entry_content' , 'genesis_do_post_content' );
add_action ( 'genesis_entry_content' , 'rgc_blog_content' );
}}
function rgc_blog_content () {
echo '<a href="' . get_permalink() .'" title="' . the_title_attribute( 'echo=0' ) . '">'; // Original Grid
@jamiemitchell
jamiemitchell / archive-book.php
Last active September 11, 2015 01:25 — forked from arelthia/archive-book.php
Genesis Custom Pods Archive template
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'tht_book_archive_custom_loop' );
/**
* Genesis custom loop
*/
function tht_book_archive_custom_loop() {
$books = new Pod('book');
$params = array(
'order' => 'ASC',
'orderby' => 'title',
@jamiemitchell
jamiemitchell / archive-portfolio.php
Last active September 11, 2015 01:25 — forked from srikat/archive-portfolio.php
How to display excerpt when hovering on featured images in Executive Pro with a flip effect. http://sridharkatakam.com/display-excerpt-hovering-featured-images-executive-pro-flip-effect/
add_action( 'genesis_entry_content', 'sk_do_post_content' );
function sk_do_post_content() {
if ( has_post_thumbnail() ) {
$image = genesis_get_image( 'size=portfolio' );
} else {
$image = '<img src="' . get_stylesheet_directory_uri() . '/images/default-image.gif" />';
}
echo '<div class="flip-container">
<div class="flipper">
@jamiemitchell
jamiemitchell / gist:cfd1748230f154957831
Last active September 11, 2015 01:26 — forked from anneallen/gist:dd47356e78ffadfbc785
Replace Genesis Page tite with Fancy wordy title
//* Remove page title for a specific page (requires HTML5 theme support)
//* This requires a custom metabox '_lob_fancy_title' to be added to the page template
/**
* Create Metaboxes For Page Fancy Title
*/
function lob_fancytitle_create_metaboxes( $meta_boxes ) {
$meta_boxes[] = array(
@jamiemitchell
jamiemitchell / functions.php
Last active September 19, 2015 06:26 — forked from reasonstousegenesis/functions.php
Demonstration of the args for genesis_get_image
<?php
// Paste the code BELOW this line into your child theme functions.
/**
* Demonstration of the args for genesis_get_image
*
* @author Reasons to Use Genesis
* @link http://reasonstousegenesis.com/featured-image/
*/
add_action( 'genesis_entry_content', 'rtug_featured_image_args' );