Skip to content

Instantly share code, notes, and snippets.

@robneu
robneu / full-content-archives-genesis.php
Last active December 24, 2015 18:29 — forked from srikat/functions.php
Conditionally display the full content on specific categories using the Genesis Framework.
<?php
add_action( 'genesis_before_loop', 'prefix_full_content_specific_categories' );
/**
* Filter the output of specific categories so that they display the full
* content regarldess of what's selected in the Genesis theme options panel.
*
* @author FAT Media <http://youneedfat.com>
* @copyright Copyright (c) 2013, FAT Media, LLC
* @license GPL-2.0+
* @uses is_category <http://codex.wordpress.org/Function_Reference/is_category>
@robneu
robneu / remove-simple-social-icons-style.php
Created October 23, 2013 10:31
Disable the output of styles in the Simple Social Icons plugin from StudioPress.
<?php
add_action( 'after_setup_theme', 'prefix_disable_simple_social_icons_styles' );
/**
* Remove Simple Social Icons styles.
*
* Simple Social Icons loads styles with a bunch of !important declarataions.
* This will disable the style output and allow you to style your icons in your
* theme more easily.
*
* @author FAT Media, LLC
<?php
/**
* Template Name: FitFluential Finds Archives
* Description: This is a page template to show the FitFluential Finds CPT
*
* @package FitFluential
* @subpackage Genesis
* @copyright Copyright (c) 2013, WP SIte Care, LLC
* @license GPL-2.0+
* @since 1.0.0
@robneu
robneu / include-post-types-in-search.php
Last active December 29, 2015 01:39
Include all custom post types in front-end search results. Post types which have been set to be excluded from search will not be displayed.
<?php
add_action( 'pre_get_posts', 'prefix_include_cpts_in_search' );
/**
* Include custom post types in search results.
*
* Custom post types are not included in the default WordPress search
* functionality. This code will add them to all front-end searches.
*
* @author FAT Media, LLC
* @link http://youneedfat.com
@robneu
robneu / podcast-air-date.php
Last active December 29, 2015 12:39
Display some information about a podcast's air date using Genesis.
<?php
add_action( 'genesis_before_content', 'wpbacon_podcast_date_info' );
/**
* Displays information about the podcast's air date including the date, time,
* and whether or not it's already aired.
*
* @since 2.0.0
*/
function wpbacon_podcast_date_info() {
<?php
/**
* Functions
*
* @package BE_Genesis_Child
* @since 1.0.0
* @link https://github.com/billerickson/BE-Genesis-Child
* @author Bill Erickson <[email protected]>
* @copyright Copyright (c) 2011, Bill Erickson
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
@robneu
robneu / disable-jetpack-modules.php
Last active April 25, 2016 20:27
Disable unwanted Jetpack Modules. The whitelist array will allow any modules you want to remain enabled to continue to function. If you don't want the module to activate, remove it from the whitelist.
<?php
add_filter( 'jetpack_get_available_modules', 'prefix_hide_jetpack_modules' );
/**
* Disable all non-whitelisted jetpack modules.
*
* As it's written, this will allow all of the currently available Jetpack
* modules to work display and be activated normally.
*
* If there's a module you'd like to disable, simply comment it out or remove it
* from the whitelist and it will no longer be available for activation.
@robneu
robneu / truncate-yoast-breadcrumb.php
Last active October 8, 2024 19:05
Truncate the title of Yoast's WordPress SEO breadcrumbs.
<?php
/**
* Truncate the title of Yoast's WordPress SEO breadcrumbs.
*
* Sometimes you will have post titles which are longer than you want
* them to be in your breadcrumbs. This will allow you to set a maximum
* length for the post title used in Yoast's breadcrumb function.
*
* @author FAT Media, LLC
* @link http://wpbacon.com/tutorials/truncate-wordpress-seo-breadcrumbs/
@robneu
robneu / gist:7744816
Last active December 29, 2015 23:48 — forked from srikat/gist:7744576
<?php
add_action ( 'genesis_entry_header', 'sk_show_page_excerpt' );
function sk_show_page_excerpt() {
$post = get_post( get_the_ID() );
$the_excerpt = $post->post_excerpt;
if ( ! is_page() || empty( $the_excerpt ) ) {
return;
}
echo $the_excerpt;
@robneu
robneu / genesis-cpt-entry-footer.php
Last active December 30, 2015 09:39
Add entry footer markup for custom post types in Genesis
<?php
/**
* Add support for the genesis entry-footer markup within custom post types.
*
* The default Genesis entry footer markup will only render for standard posts.
* this removes the default genesis markup and recreates it allowing for CPT
* usage in addition to standard posts. Pages are still ignored.
*
* @author FAT Media, LLC