Skip to content

Instantly share code, notes, and snippets.

💻
<code />

Greg Rickaby gregrickaby

💻
<code />
Block or report user

Report or block gregrickaby

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gregrickaby
gregrickaby / home.php
Created Feb 13, 2012
Genesis Custom Loop w/ Featured Image
View home.php
<?php $loop_2 = new WP_Query( 'cat=1&showposts=2&orderby=date&order=DESC' ); while ($loop_2->have_posts()) : $loop_2->the_post(); ?>
<div <?php post_class(); ?>>
<div class="column-5 left">
<a href="<?php the_permalink(); ?>" /><?php the_post_thumbnail( 'thumbnail', array( 'class' => 'featured-image' ) ); ?></a>
<a href="<?php the_permalink(); ?>" /><span class="read-more">Read More</span></a>
</div>
<div class="column-6 right">
<h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
View radio-latest-news-widget.php
<?php
/**
* Adds Radio Latest News Widget.
*
* @package Radio
* @package Widgets
* @author Greg Rickaby, Justin Sternberg (@Jtsternberg), Travis Smith (@wp_smith), and StudioPress
* @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
* @link http://www.studiopress.com/themes/genesis
*/
@gregrickaby
gregrickaby / mod_jock.php
Created Feb 21, 2012
Jock Rotator Usage
View mod_jock.php
<?php
/**
* File mod_jock.php
*
* This file builds the Jock Rotator. The Jock Rotator is nothing more than a PHP Case Statement.
* It reads your server's time/date and asks: "Is it before 10:00am? Yes? Then display this jock."
*
* @version 2.5.0
* @author Greg Rickaby <greg@gregrickaby.com>
* @copyright Copyright (c) 2012
@gregrickaby
gregrickaby / functions.php
Created Mar 21, 2012
Genesis Comments Form
View functions.php
add_filter( 'genesis_comment_form_args', 'child_comment_form' );
/**
* Change "Post Comment" button text.
*
* @author Greg Rickaby
* @since 1.0.0
*/
function child_comment_form($args) {
$args = array (
'label_submit' => __( 'Submit', 'genesis' ),
@gregrickaby
gregrickaby / functions.php
Created May 16, 2012
Thesis Child Theme
View functions.php
<?php
/**
* Functions.php
*
* This file handles the child theme setup and intialization.
*
* @category FMG
* @package Functions
* @author Greg Rickaby
* @since 1.0.0
@gregrickaby
gregrickaby / functions.php
Created May 30, 2012
Custom Post-Info with Google Rich Snippet support (Genesis)
View functions.php
remove_action( 'genesis_before_post_content', 'genesis_post_info' );
add_action( 'genesis_before_post_content', 'child_post_info' );
/**
* Custom Post-Info with Google Rich Snippet support
*
* @author Greg Rickaby
* @since 1.0.0
*/
function child_post_info() {
if ( is_page() )
@gregrickaby
gregrickaby / remove-woocommerce-styles-scripts.php
Last active Oct 28, 2019
Remove WooCommerce styles and scripts.
View remove-woocommerce-styles-scripts.php
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below into functions.php
/**
* Manage WooCommerce styles and scripts.
*/
function grd_woocommerce_script_cleaner() {
// Remove the generator tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
@gregrickaby
gregrickaby / remove-all-woocommerce-scripts-styles.php
Last active Jan 2, 2019
Remove ALL WooCommerce scripts and styles.
View remove-all-woocommerce-scripts-styles.php
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below into functions.php
/**
* Remove all WooCommerce scripts and styles! Forever!
*
* @author WP Smith
* @since 1.0.0
*/
function grd_remove_woocommerce_styles_scripts() {
@gregrickaby
gregrickaby / home.php
Created Jun 3, 2012 — forked from jtsternberg/home.php
Genesis Custom Loop w/ Featured Image and Odd/Even support
View home.php
<?php
$odd_or_even = 'even';
$args = array(
'cat' => 1,
'posts_per_page' => 2,
'order' => 'DESC'
);
$query = new WP_Query( $args );
if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();
@gregrickaby
gregrickaby / functions.php
Created Jun 5, 2012
Custom Post-Info with Google Rich Snippet support (Thesis)
View functions.php
add_action( 'thesis_hook_byline_item', 'custom_byline' );
/**
* Custom Post-Info with Google Rich Snippet support
*
* @author Greg Rickaby
* @since 1.0.0
*/
function custom_byline() {
if ( is_page() )
return; // don't do post-info on pages ?>
You can’t perform that action at this time.