- 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
/***************************** | |
*Add a custom Welcome Dashboard Panel | |
*****************************/ | |
function my_welcome_panel() { | |
?> | |
<div class="top-welcome-panel-content"> | |
<div class="top-welcome-panel-logo" style="height: 120px; padding: 5px;text-align: center;"> | |
<!-- Adds a logo top left--> |
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
/* STYLING NINJA FORMS - add to your stylesheet and adjust */ | |
/* The full form */ | |
#ninja_forms_form_1_wrap { | |
background-color: #f89a16; | |
padding: 20px; | |
border: 2px solid #ccc; | |
border-radius: 8px; | |
box-shadow: 0px 3px 5px #444; |
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
//* The following code was taken from: https://dl.dropboxusercontent.com/u/2503558/GenesisWP/code-snippets.html | |
//* and works only for child themes using the Genesis framework. | |
//* | |
//* Add last updated date to the post info in entry header | |
add_filter( 'genesis_post_info', 'sk_post_info_filter' ); | |
function sk_post_info_filter($post_info) { | |
if (get_the_modified_time() != get_the_time()) { | |
$post_info = $post_info . '<br/>Last updated on: ' . the_modified_date('F j, Y', '', '', false); | |
} |
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
//* Define a default post thumbnail | |
//* http://dreamwhisperdesigns.com/genesis-tutorials/genesis-default-thumbnails/ | |
add_filter('genesis_get_image', 'default_image_fallback', 10, 2); | |
function default_image_fallback($output, $args) { | |
global $post; | |
if( $output || $args['size'] == 'full' ) | |
return $output; | |
$thumbnail = CHILD_URL.'/images/WordPress-info150x150.jpg'; |
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
/* The below code removes all the default WordPress widgets. I commeted the ones I do not want to remove. */ | |
// unregister all widgets | |
function unregister_default_widgets() { | |
unregister_widget('WP_Widget_Pages'); | |
unregister_widget('WP_Widget_Calendar'); | |
unregister_widget('WP_Widget_Archives'); | |
unregister_widget('WP_Widget_Links'); | |
unregister_widget('WP_Widget_Meta'); | |
unregister_widget('WP_Widget_Search'); |
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
// Adding code to create an effect on the header/nav on scroll | |
jQuery(function( $ ){ | |
if( $( document ).scrollTop() > 0 ){ | |
$( '.site-header' ).addClass( 'dark' ); | |
} | |
// Add opacity class to site header | |
$( document ).on('scroll', function(){ |
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
// Customize the post meta "FILED UNDER: -category name-" categories text and below the post preview in a blog page and change it at the bottom of a post. | |
// http://wordpress.stackexchange.com/questions/50961/removing-post-meta-from-category-pages */ | |
// | |
add_filter( 'genesis_post_meta', 'sp_post_meta_filter' ); | |
function sp_post_meta_filter($post_meta) { | |
if ( !is_page() ) { | |
if (is_archive() ) $post_meta = ''; | |
else $post_meta = '[post_categories before="Categories: "] [post_tags before="Keywords: "]'; | |
return $post_meta; | |
}} |
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
//Altitude Pro customize.php code - | |
// Tutorial I am brushing up is here: http://easywebdesigntutorials.com/customizing-altitude-pro-genesis-child-theme/ | |
<?php | |
/** | |
* Customizer additions. | |
* | |
* @package Altitude Pro | |
* @author StudioPress | |
* @link http://my.studiopress.com/themes/altitude/ |
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
// Inside your functions file add the following code | |
// | |
function wpforce_featured() { | |
global $post; | |
$already_has_thumb = has_post_thumbnail($post->ID); // If post have a featured image use that. | |
if (!$already_has_thumb) { | |
// If post does not have a featured image then get the first post image and set as featured image. | |
$attached_image = get_children( "post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1" ); // Number 1 relates to taking post image number 1 and adding it as a featured image. | |
if ($attached_image) { | |
foreach ($attached_image as $attachment_id => $attachment) { |