Skip to content

Instantly share code, notes, and snippets.

View freezvd's full-sized avatar

Valentin Zmaranda freezvd

  • Bucharest, Romania
View GitHub Profile
<?php
//* don't copy php tag above
//* add following code to functions.php:
//* Load backstretch js
/** Add metabox for backstretch default/fallback background image */
add_action( 'genesis_theme_settings_metaboxes', 'themename_theme_settings_metaboxes', 10, 1 );
function themename_theme_settings_metaboxes( $pagehook ) {
<?php
/* Remove the post entry class
------------------------------------------------------------ */
add_filter( 'post_class', 'remove_entry_post_class' );
function remove_entry_post_class( $classes ) {
$classes = array_diff( $classes, array( 'entry' ) );
return $classes;
<?php
//* Do NOT include the opening php tag
//* Modify the size of the Gravatar in the author box
add_filter( 'genesis_author_box_gravatar_size', 'custom_author_box_gravatar' );
function custom_author_box_gravatar( $size ) {
return 96;
}
//* Modify the size of the Gravatar in the entry comments
<?php
/**
* Archive
*
* @package BE_Genesis_Child
* @since 1.0.0
* @link https://github.com/billerickson/BE-Genesis-Child
* @author Bill Erickson <bill@billerickson.net>
* @copyright Copyright (c) 2011, Bill Erickson
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
<?php
// Template Name: Portsecond
// Force layout to full-width-content
add_filter('genesis_pre_get_option_site_layout', 'crystal_portsecond_layout');
function crystal_portsecond_layout($layout) {
$layout = 'full-width-content';
return $layout;
}
<?php
/**
* Portfolio Archive
*
* @package BE_Genesis_Child
* @since 1.0.0
* @link https://github.com/billerickson/BE-Genesis-Child
* @author Bill Erickson <bill@billerickson.net>
* @copyright Copyright (c) 2011, Bill Erickson
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
<?php
/**
* Taxonomies
*
* This file registers any custom taxonomies
*
* @package CoreFunctionality
* @since 1.0.0
* @link https://github.com/billerickson/Core-Functionality
* @author Bill Erickson <bill@billerickson.net>
<?php
/* Add the featured image before post title
------------------------------------------------------------ */
add_action( 'genesis_entry_header', 'jm_portfolio_grid',5 );
function jm_portfolio_grid() {
if ( $image = genesis_get_image( 'format=url&size=portfolio' ) ) {
printf( '<div class="portfolio-image"><a href="%s" rel="bookmark"><img src="%s" alt="%s" /></a></div>', get_permalink(), $image, the_title_attribute( 'echo=0' ) );
<?php
/* Add the featured image after post title
------------------------------------------------------------ */
add_action( 'genesis_entry_content', 'jm_portfolio_grid' );
function jm_portfolio_grid() {
if ( $image = genesis_get_image( 'format=url&size=portfolio' ) ) {
printf( '<div class="portfolio-image"><a href="%s" rel="bookmark"><img src="%s" alt="%s" /></a></div>', get_permalink(), $image, the_title_attribute( 'echo=0' ) );
<?php
/* Remove the entry meta
------------------------------------------------------------ */
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );