Skip to content

Instantly share code, notes, and snippets.

View nutsandbolts's full-sized avatar

Andrea Whitmer nutsandbolts

View GitHub Profile
@srikat
srikat / functions.php
Created December 17, 2013 01:54
Showing Footer Widget Areas only on homepage in Education theme. http://sridharkatakam.com/show-footer-widget-areas-homepage-education-theme/
// Show Footer Widget Areas only on homepage
add_action( 'genesis_after_content_sidebar_wrap', 'sk_footer_widget_areas' );
function sk_footer_widget_areas() {
if ( is_home() || is_front_page() )
return;
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
}
<?php //do not include this php tag
add_action ('genesis_after_entry', 'my_custom_loop_func');
function my_custom_loop_func() {
if(is_home())
{
global $wp_query;
if( 2 == $wp_query->current_post ) {
@srikat
srikat / front-page.php
Created October 9, 2013 05:42
To make home featured widgets in Minimum Pro appear site-wide, delete the code provided in first box from front-page.php and add the code provided in the second box in functions.php
if ( is_active_sidebar( 'home-featured-1' ) || is_active_sidebar( 'home-featured-2' ) || is_active_sidebar( 'home-featured-3' ) || is_active_sidebar( 'home-featured-4' ) ) {
//* Add Home featured Widget areas
add_action( 'genesis_before_content_sidebar_wrap', 'minimum_home_featured', 15 );
}
@tomazzaman
tomazzaman / render.php
Created February 25, 2015 11:01
Add Jetpack Markdown support for ACF
<?php
// Add these filters in functions.php
add_filter( 'meta_content', 'wptexturize' );
add_filter( 'meta_content', 'convert_smilies' );
add_filter( 'meta_content', 'convert_chars' );
add_filter( 'meta_content', 'wpautop' );
add_filter( 'meta_content', 'shortcode_unautop' );
add_filter( 'meta_content', 'prepend_attachment' );
@pmgllc
pmgllc / content_limit_tags.php
Created July 3, 2014 18:07
Allow HTML tags in content limit
<?php
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>';