Skip to content

Instantly share code, notes, and snippets.

View JiveDig's full-sized avatar

Mike Hemberger JiveDig

View GitHub Profile
@JiveDig
JiveDig / gist:5834083
Last active December 18, 2015 19:39
Use WP_Query To Alter The Posts Per Page Of A Custom Taxonomy Term Archive Of A Custom Post Type. When using Post Types Order plugin ( ) add: 'orderby' => 'menu_order', to the $args
<?php
//* Replace the standard loop with our custom loop
//* props to David Wang, he is the man!
// @author David Wang
// @link http://genesissnippets.com/genesis-custom-loop/
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'child_do_custom_loop' );
function child_do_custom_loop() {
@JiveDig
JiveDig / gist:5975842
Last active December 19, 2015 15:19
Create buttons in the Latent theme for the Genesis Framework
<a class="button small" href="#">Button</a>
<a class="button" href="#">Button</a>
<a class="button large" href="#">Button</a>
<a class="button blue small" href="#">Button</a>
<a class="button blue" href="#">Button</a>
@JiveDig
JiveDig / gist:5976093
Last active December 19, 2015 15:28
Create icon buttons (via Font Awesome) in the Latent theme for the Genesis Framework
<a class="button purple" href="#"><i class="icon-home icon-large"></i> Go Home</a>
<a class="button blue" href="#"><i class="icon-info-sign icon-large"></i> Button</a>
<a class="button green" href="#"><i class="icon-comment icon-large"></i> Comment</a>
<a class="button orange" href="#"><i class="icon-repeat icon-large icon-spin"></i> Refresh</a>
<a class="button red" href="#"><i class="icon-cog icon-large"></i> Settings</a>
@JiveDig
JiveDig / gist:5977898
Last active December 19, 2015 15:39
Add social icons to the Latent theme by The Stiz Media
<a href="#" class="social-icon"><i class="icon-twitter icon-large"></i></a>
<a href="#" class="social-icon"><i class="icon-google-plus icon-large"></i></a>
<a href="#" class="social-icon"><i class="icon-facebook icon-large"></i></a>
<a href="#" class="social-icon"><i class="icon-instagram icon-large"></i></a>
@JiveDig
JiveDig / gist:5978634
Created July 11, 2013 19:51
Add action circles to Latent theme by The Stiz Media
<div class="action-circles">
<div class="one-third first">
<a href="#" class="action-circle"><i class="icon-refresh"></i>Infinite</a>
</div>
<div class="one-third">
<a href="#" class="action-circle"><i class="icon-globe"></i>Worldwide</a>
</div>
<div class="one-third">
<a href="#" class="action-circle"><i class="icon-headphones"></i>Creative</a>
</div>
@JiveDig
JiveDig / gist:5978694
Created July 11, 2013 19:58
Add boxed content to Latent theme from The Stiz Media
<div class="boxed">
Put any content here!
</div>
@JiveDig
JiveDig / gist:5978838
Last active December 19, 2015 15:48
Add quote box to Latent theme from The Stiz Media
<div class="one-half first">
<div class="quote-box"><p>Quote boxes are great for quotes!
<strong>- This Guy</strong></p>
</div>
</div>
<div class="one-half">
<div class="quote-box"><p>Quote boxes are great for testimonials!
<strong>- This Other Guy</strong></p>
</div>
</div>
@JiveDig
JiveDig / gist:6020630
Created July 17, 2013 13:39
Replace site title with an inline logo in Genesis 2.0 with HTML5
// Requires Genesis 2.0 with HTML5
// Replace site title with an inline logo
remove_action( 'genesis_site_title', 'genesis_seo_site_title' );
add_action( 'genesis_site_title', 'child_do_logo' );
function child_do_logo() {
$site_url = site_url();
$blog_title = get_bloginfo();
@JiveDig
JiveDig / gist:6214483
Created August 12, 2013 19:52
Genesis color picker and dynamic url changer for front end
// Create color style options
add_theme_support(
'genesis-style-selector',
array(
'latent-blue' => __( 'Blue', CHILD_DOMAIN ),
'latent-green' => __( 'Green', CHILD_DOMAIN ),
'latent-orange' => __( 'Orange', CHILD_DOMAIN ),
'latent-red' => __( 'Red', CHILD_DOMAIN ),
)
);
@JiveDig
JiveDig / new_gist_file.php
Created October 23, 2013 14:58
Custom post type category sort using get_terms() (orderby doesn't work here!)
// Add product category sort
add_action( 'genesis_before_loop', 'orc_product_category_sort' );
function orc_product_category_sort() {
if ( is_post_type_archive( 'product' ) OR is_tax( 'product_cat' ) ) {
$portfolio = site_url('/shop/');
echo '<a name="sort"></a>';
echo '<div class="category-sort">';