This file contains hidden or 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_action( 'genesis_before_loop', 'child_maybe_do_grid_loop' ); | |
/** | |
* Possibly amend the loop. | |
* | |
* Before we get to the loop, see if we're anywhere but a single page. If so, | |
* swap out the standard loop for our grid loop. | |
* | |
* @author Gary Jones |
This file contains hidden or 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 | |
/** | |
* Prepare the grid loop. | |
* | |
* Takes care of existing query arguments for the page e.g. if it's a category | |
* archive page, then the "cat" argument is carried into the grid loop, unless | |
* it's overwritten in the $grid_args. | |
* | |
* @author Gary Jones |
This file contains hidden or 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 | |
// Only use the grid on the first page | |
if ( 0 == $paged) { | |
// Merge the standard query for this page, and our preferred loop arguments | |
genesis_grid_loop( array_merge( $query_args, $grid_args ) ); | |
} else { | |
query_posts( array_merge( $query_args, $grid_args ) ); | |
genesis_standard_loop(); | |
} |
This file contains hidden or 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 some extra body classes to grid posts. | |
* | |
* Change the $columns value to alter how many columns wide the grid uses. | |
* | |
* @author Gary Jones | |
* @link http://code.garyjones.co.uk/genesis-grid-loop-advanced/ | |
* |
This file contains hidden or 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
#content .genesis-grid { | |
float: left; | |
margin: 0; | |
padding: 15px 0 10px 3%; | |
} | |
#content .genesis-grid-column-1 { | |
clear: left; | |
padding-left: 0; | |
} | |
.size1of2 { |
This file contains hidden or 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_action( 'genesis_before_loop', 'child_maybe_do_grid_loop' ); | |
/** | |
* Possibly amend the loop. | |
* | |
* Before we get to the loop, see if we're anywhere but a single page. If so, | |
* swap out the standard loop for our grid loop. | |
* | |
* @author Gary Jones |
This file contains hidden or 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( 'genesis_post_date_shortcode', 'custom_post_date_shortcode', 10, 2 ); | |
/** | |
* Customize post date shortcode, to include year. | |
* | |
* @param string $output Existing post date shortcode output. | |
* @param array $atts Associative array of shortcode attributes. | |
* | |
* @return string Amended markup. |
This file contains hidden or 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 hidden or 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( 'genesis_nav_items', 'sws_social_icons', 10, 2 ); | |
add_filter( 'wp_nav_menu_items', 'sws_social_icons', 10, 2 ); | |
/** | |
* Adds a widget area before primary menu items. | |
* | |
* @author Bill Erickson | |
* @author Gary Jones | |
* @link https://gist.github.com/gists/1799174 |
This file contains hidden or 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
# Here we're copying the trunk of one of my plugins, to a tag of 1.3.0, with a simple message. | |
svn copy https://plugins.svn.wordpress.org/genesis-admin-bar-plus/trunk https://plugins.svn.wordpress.org/genesis-admin-bar-plus/tags/1.3.0 -m "Release 1.3.0" |