- 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.
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
// Enqueue scripts and styles | |
add_action( 'wp_enqueue_scripts', 'custom_scripts_styles_mobile_responsive' ); | |
function custom_scripts_styles_mobile_responsive() { | |
wp_enqueue_script( 'beautiful-responsive-menu', get_stylesheet_directory_uri() . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' ); | |
wp_enqueue_style( 'dashicons' ); | |
} |
This file contains 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
# Get rid of the default crap | |
wp site empty --yes | |
# Remove Hello Dolly (sorry Matt) | |
wp plugin uninstall hello | |
# Install Genesis framework | |
wp theme install <super-secret-url-for-genesis> | |
# Install plugins available in repo |
This file contains 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 | |
/* | |
Plugin Name: Example Plugin | |
*/ | |
<?php | |
function my_ninja_forms_date_code(){ | |
//Declare $ninja_forms_processing as a global variable. | |
global $ninja_forms_processing; | |
//only process this code on the form ID 1 | |
$form_id = $ninja_forms_processing->get_form_ID(); |
This file contains 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 | |
/* | |
Plugin Name: Ninja Forms Email Attachment | |
*/ | |
function add_my_attachment( $attachments ) { | |
$attachments[] = 'server_path_to_my_file'; | |
return $attachments; | |
} |
This file contains 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
// Add Featured Image on top of pages as background image | |
add_action( 'genesis_after_header', 'featured_page_image', 11 ); | |
function featured_page_image() { | |
if ( !is_singular('page') && !is_home() ) return; | |
if (is_home()){ | |
// Get the ID of your posts page | |
$id = get_option('page_for_posts'); | |
// Use the ID to get the post thumbnail or whatever | |
if ( has_post_thumbnail( $id ) ) { | |
//echo get_the_post_thumbnail( $id, 'page-featured', array( 'class' => 'aligncenter page-featured' ) ); |
This file contains 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
/** Genesis Previous/Next Post Post Navigation */ | |
add_action( 'genesis_before_comments', 'eo_prev_next_post_nav' ); | |
function eo_prev_next_post_nav() { | |
if ( is_single() ) { | |
echo '<div class="prev-next-navigation">'; | |
previous_post_link( '<div class="previous">Previous article: %link</div>', '%title' ); |
This file contains 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
/*function adjust_image_sizes_attr( $sizes, $size ) { | |
$sizes = '(max-width: 300px) 300px, (max-width: 768px) 768px, (max-width: 1024px) 1024px, (max-width: 1500px) 1500px, 1024px'; | |
return $sizes; | |
} | |
add_filter( 'wp_calculate_image_sizes', 'adjust_image_sizes_attr', 10 , 2 );*/ | |
//* Add custom images instead of default resized from srcset | |
//add_filter( 'wp_calculate_image_srcset', 'ig_add_custom_image_srcset', 10, 5 ); | |
function ig_add_custom_image_srcset( $sources, $size_array, $image_src, $image_meta, $attachment_id ){ | |
OlderNewer