Skip to content

Instantly share code, notes, and snippets.

@chillybin
chillybin / functions.php
Last active August 29, 2015 14:26
Adding custom Favicon
<?php // Don't include this when copying code
add_filter( 'genesis_pre_load_favicon', 'cb_pre_load_favicon' );
/**
* Simple favicon override to specify your favicon's location.
*
* @since 2.0.0
*/
function cb_pre_load_favicon() {
@chillybin
chillybin / gist:fded1a432c19338e8960
Created November 24, 2014 03:17
Back To Top jQuery
$(document).ready(function() {
var offset = 500;
var duration = 1000;
$(window).scroll(function() {
if ($(this).scrollTop() > offset) {
$('.back-to-top').fadeIn(duration);
} else {
$('.back-to-top').fadeOut(duration);
}
});
<?php
// pulled from https://github.com/billerickson/BE-Genesis-Child
// reposition inpost metabox
remove_action( 'admin_menu', 'genesis_add_inpost_layout_box' );
add_action( 'admin_menu', 'be_add_inpost_layout_box' );
function be_add_inpost_layout_box() {
if ( ! current_theme_supports( 'genesis-inpost-layouts' ) )
return;
@chillybin
chillybin / page-most-viewed.php
Last active December 20, 2015 03:08
Template Name: Galleries - Most Viewed
// this in page-most-viewed.php
$args=array(
'meta_key' => 'be_stats',
'orderby' => 'meta_value_num',
'posts_per_page' => -1,
'post_type' => 'photo_galleries',
'order' => 'asc',
'paged' => $paged,
);