This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @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() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// insert into functions.php | |
//* Add new image sizes | |
add_image_size('grid-thumbnail', 100, 100, TRUE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ); |