Skip to content

Instantly share code, notes, and snippets.

<?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
//* 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 ) {
add_filter( 'get_the_content_limit_allowedtags', 'get_the_content_limit_custom_allowedtags' );
/**
* @author Brad Dalton
* @example http://wp.me/p1lTu0-a5w
*/
function get_the_content_limit_custom_allowedtags() {
// Add custom tags to this string
return '<script>,<style>,<br>,<em>,<i>,<ul>,<ol>,<li>,<a>';
}
function mp_remove_body_classes($classes, $class){
foreach($classes as &$str){
if(strpos($str, "YOUR_CLASS_HERE") > -1){
$str = "";
}
}
return $classes;
}
add_filter("body_class", "mp_remove_body_classes", 10, 2);
<?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 ) {
// Default Simple Social Icon Styles
add_filter( 'simple_social_default_styles', 'minmimum_default_style' );
function minmimum_default_style( $defaults ) {
$defaults['size'] = '100';
$defaults['border_radius'] = '100';
$defaults['icon_color'] = '#fff';
$defaults['icon_color_hover'] = '#fff';
$defaults['background_color'] = '#404435';
$defaults['background_color_hover'] = '#3c4556';
<?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: Portfolio */
/**
* Portfolio Listing
*
*/
function be_portfolio_listing() {
$args = array(
'post_type' => 'portfolio',
<?php
//* Remove the entry meta in the entry header
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop
add_action( 'genesis_loop', 'custom_do_loop' ); // Add custom loop
function custom_do_loop() {
add_action( 'pre_get_posts', 'sk_show_titles_only_category_pages' );
/**
* Show Linked Titles Only for Posts in Category Pages
*
* @author Sridhar Katakam
* @author Bill Erickson
* @link http://www.billerickson.net/customize-the-wordpress-query/
* @param object $query data
*
*/