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 | |
//* Add sorting buttons | |
add_action('genesis_before_loop', 'ac_sort_buttons'); | |
function ac_sort_buttons() { | |
echo '<p>'; | |
echo 'Sort:'; | |
echo '<a href="?sort=oldest">Oldest</a>'; | |
echo '<a href="?sort=alpha">Alphabetical</a>'; |
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
<?php | |
/** | |
* Main plugin file. This plugin for Genesis Theme Framework allows modifying of default layouts for | |
* homepage, singular, archive, attachment, search, 404 and even bbPress 2.x pages via Genesis theme settings. | |
* | |
* @package GenesisLayoutExtras | |
* @author David Decker | |
* @origin Based on the work of @WPChildThemes for original plugin called "Genesis Layout Manager" (C) 2010 | |
* | |
* Plugin Name: Genesis Layout Extras |
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
$styles = maybe_unserialize( get_post_meta($post->ID, 'it_classroom_style_taxonomy',true) ); | |
echo $styles[0]; | |
$style = get_term_by( 'id', $styles[0], 'style' );//get_term($styles[0], 'style'); | |
print_r($style); | |
echo $style->name; |
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 | |
/** | |
* Possibly amend the loop. | |
* Specify the conditions under which the grid loop should be used | |
* | |
* @author Bill Erickson | |
* @link http://code.garyjones.co.uk/genesis-grid-loop-advanced/ | |
*/ | |
function child_maybe_do_grid_loop() { |
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 | |
/** | |
* Possibly amend the loop. | |
* | |
* Specify the conditions under which the grid loop should be used. | |
* | |
* @author Bill Erickson | |
* @author Gary Jones | |
* @link http://code.garyjones.co.uk/genesis-grid-loop-advanced/ |
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 | |
remove_action('genesis_loop', 'genesis_do_loop'); | |
add_action('genesis_loop', 'do_film_loop'); | |
function do_film_loop(){ | |
$video_file_args = array( | |
'post_type' => 'film', | |
'order_by' => 'title', | |
'order' => 'ASC', |
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 | |
add_filter( 'body_class', 'gk_add_body_class' ); | |
function gk_add_body_class( $classes ) { | |
$classes[] = 'custom-class'; | |
if ( !empty( $_GET['bg'] ) ) | |
$classes[] = 'bg' . esc_attr( $_GET['bg'] ); | |
return $classes; | |
} |
OlderNewer