Skip to content

Instantly share code, notes, and snippets.

View tomfinitely's full-sized avatar

Tom Finley tomfinitely

View GitHub Profile
@bearded-avenger
bearded-avenger / gist:f478639cbf0847c48230
Last active February 27, 2016 09:32
Aesop Story Engine - Full Screen Components in Genesis
.aesop-on-genesis .site-inner{
max-width:100%;
}
.aesop-on-genesis .entry {
padding-left:0;
padding-right:0;
}
.aesop-on-genesis .entry-header,
.aesop-on-genesis .entry-content > *:not(.aesop-component) {
width: 100%;
@JanHoek
JanHoek / accessible-read-more.php
Last active April 20, 2017 16:05
Accessible “Read More” links for Genesis
<?php //* Don't copy the php
//* Accessible Read More links for Genesis
add_filter('excerpt_more', 'jan_read_more_link');
add_filter( 'the_content_more_link', 'jan_read_more_link' );
function jan_read_more_link() {
$trimtitle = get_the_title();
$shorttitle = wp_trim_words( $trimtitle, $num_words = 5, $more = '…' );
@iamcanadian1973
iamcanadian1973 / genesis-column-clases.scss
Created July 14, 2014 01:17
Genesis Column Classes (SASS)
// @mixin create column widths
@function col_width( $n, $total_columns, $total_width: 1140px, $gutter_width: 48px )
{
$col_width: ($total_width - ($gutter_width * ($total_columns - 1))) / $total_columns;
$total_width: $total_width;
$columns_width: ($n * $col_width) + (($n - 1) * $gutter_width);
@return percentage($columns_width/$total_width);
}
//
@graylaurenm
graylaurenm / page_category_index-2.php
Last active August 29, 2015 14:02
List Posts By Category: Custom page template to grab all categories and create an un-ordered list of posts within each. Page template create for Genesis, but could be adapted to any WordPress theme. http://oncecoupled.com/2014/06/13/page-template-list-posts-by-category/
<?php
/**
* Template Name: Category Index
* Created By: Lauren Gray Designs
* URL: http://oncecoupled.com
*/
/* Exclude categories: */
$args = array(
'type' => 'post',
@srikat
srikat / gist:11391704
Last active October 29, 2015 14:53
How to replace, reorder and add new icons in Simple Social Icons. http://sridharkatakam.com/replace-reorder-add-new-icons-simple-social-icons/
<?php
//* Do NOT include the opening php tag
//* Make Font Awesome available
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
function enqueue_font_awesome() {
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css' );
}
<?php
/**
* Remove Genesis Page Templates
*
* @author Bill Erickson
* @link http://www.billerickson.net/remove-genesis-page-templates
*
* @param array $page_templates
* @return array
@razwan
razwan / _baseline.scss
Created April 14, 2014 16:20
Aligning type to baseline the right way with SASS
$base-font-size: 16px;
$base-line-height: 1.5;
// this value may vary for each font
// unitless value relative to 1em
$cap-height: 0.68;
@mixin baseline($font-size, $scale: 2) {
@cdils
cdils / genesis-simple-sidebar-custom-post-type.php
Last active November 26, 2018 00:13
Use the Genesis Simple Sidebars plugin with a custom post type with the name 'wap-community'.
<?php //remove this line
// Add support for Genesis Simple Sidebars to Community post type
add_post_type_support( 'wap-community', 'genesis-simple-sidebars' );
@rickrduncan
rickrduncan / custom-genesis-search-form.php
Last active November 9, 2017 07:29
508 compliant Genesis search form
<?php
//* Do NOT include the opening php tag
//* Alter the Genesis Search for so that we can change the destination page and our querystring parameter.
add_filter( 'genesis_search_form', 'b3m_search_form', 10, 4);
function b3m_search_form( $form, $search_text, $button_text, $label ) {
$onfocus = " onfocus=\"if (this.value == '$search_text') {this.value = '';}\"";
$onblur = " onblur=\"if (this.value == '') {this.value = '$search_text';}\"";
$form = '<form role="search" method="get" class="searchform search-form" action="' . home_url() . '/search">
wp_enqueue_style( 'animate', get_stylesheet_directory_uri() . '/css/animate.min.css' );
// load Waypoints
// Source: http://imakewebthings.com/jquery-waypoints/
wp_enqueue_script( 'waypoints', get_stylesheet_directory_uri() . '/js/waypoints.min.js', array( 'jquery' ), '1.0.0' );
wp_enqueue_script( 'waypoints-init', get_stylesheet_directory_uri() .'/js/waypoints-init.js' , array( 'jquery', 'waypoints' ), '1.0.0' );