Skip to content

Instantly share code, notes, and snippets.

View marisqaporter's full-sized avatar

marisqaporter

View GitHub Profile
<?php
/**
* Fix Gravity Form Tabindex Conflicts
* http://gravitywiz.com/fix-gravity-form-tabindex-conflicts/
*/
add_filter( 'gform_tabindex', 'gform_tabindexer', 10, 2 );
function gform_tabindexer( $tab_index, $form = false ) {
$starting_index = 1000; // if you need a higher tabindex, update this number
if( $form )
add_filter( 'gform_tabindex_' . $form['id'], 'gform_tabindexer' );
@marisqaporter
marisqaporter / functions.php
Created February 29, 2016 21:04 — forked from arkadiusjonczek/functions.php
WordPress: Add new image sizes
// insert into functions.php
//* Add new image sizes
add_image_size('grid-thumbnail', 100, 100, TRUE);
/**
*
* @author Calvin Makes
* @link http://www.calvinmakes.com/
* @version 1.0
*
* Add previous and next buttons to custom post types.
*/
function cm_custom_navigation_links() {
// Add custom post class to posts in the "Featured" category
add_filter('post_class', 'eo_custom_post_class');
function eo_custom_post_class($classes)
{
$new_class = 'featured-post';
if (in_category('Featured'))
$classes[] = esc_attr(sanitize_html_class($new_class));
return $classes;
}
@marisqaporter
marisqaporter / 0_reuse_code.js
Last active August 29, 2015 14:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php
//* Do NOT include the opening php tag
//* Prefix author breadcrumb trail with the text 'Articles written by'
add_filter( 'genesis_breadcrumb_args', 'b3m_prefix_author_breadcrumb' );
function b3m_prefix_author_breadcrumb( $args ) {
$args['labels']['author'] = 'Articles written by ';
return $args;