Skip to content

Instantly share code, notes, and snippets.

View pixelloop's full-sized avatar

pixelloop

View GitHub Profile
@pixelloop
pixelloop / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@pixelloop
pixelloop / css_resources.md
Last active August 29, 2015 14:21 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

// Add custom.css to Genesis
add_action( 'wp_enqueue_scripts', 'custom_load_custom_style_sheet' );
function custom_load_custom_style_sheet() {
wp_enqueue_style( 'custom-stylesheet', CHILD_URL . '/custom.css', array(), PARENT_THEME_VERSION );
}
// Exclude specific categories from home
add_action( 'pre_get_posts', 'bg_exclude_categories' );
function bg_exclude_categories( $query ) {
if( $query->is_main_query() && $query->is_home() ) {
$query->set( 'cat', '-5,-9' );
}
}
// Add My Custom Functions File
include_once( get_stylesheet_directory() . '/custom.php' );
<?php
/**
* Custom Functions
*/
//* Back To Top
add_action('wp_footer', 'go_to_top');
function go_to_top() {
?>
<script type="text/javascript">
jQuery(function($) {
$('.backtotop').click(function() {
$('html, body').animate({scrollTop:0}, 'slow');
// Add My Custom Functions File
include_once( get_stylesheet_directory() . '/custom/custom.php' );