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_action('wp_print_styles', 'load_fonts'); | |
function load_fonts() { | |
wp_register_style('googleFonts', 'http://fonts.googleapis.com/css?family=Rock+Salt|Neucha'); | |
wp_enqueue_style( 'googleFonts'); | |
} | |
//* Change the "http://" address from the use code from the google font you want | |
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
.clearfix:after { | |
visibility: hidden; | |
display: block; | |
font-size: 0; | |
content: " "; | |
clear: both; | |
height: 0; | |
} |
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
// Set the variables | |
$width: 1140px; | |
$columns: 12; | |
$gutter: 24px; | |
// Create the row | |
.row { | |
width: 100%; | |
max-width: $width; | |
box-sizing: border-box; |
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
/* | |
* Custom Tweaks | |
*/ | |
define('WP_HOME', 'http://sitename.com'); // Lock settings of URL in Admin | |
define('AUTSAVE_INTERVAL', 120); // in seconds | |
define('WP_POST_REVISIONS', 4); // Max # of post revision history | |
define('EMPTY_TRASH_DAYS', 3); // # of days | |
define('DISALLOW_FILE_EDIT', true); // Lock out CSS in Admin |
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 | |
if ((date('m') == 4) && (date('d') == 9)) { ?> | |
<p>Today is <a href="http://naked.dustindiaz.com/">CSS Naked Day</a>!</p> | |
<?php } ?> |
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
{ | |
"remove-empty-rulesets": true, | |
"always-semicolon": true, | |
"color-case": "lower", | |
"block-indent": " ", | |
"color-shorthand": true, | |
"element-case": "lower", | |
"eof-newline": false, | |
"leading-zero": false, | |
"quotes": "double", |
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
@mixin size($break) { | |
@if $break == small { | |
@media (min-width: 580px) { @content; } | |
} | |
@else if $break == medium { | |
@media (min-width: 1080px) { @content; } | |
} | |
@else if $break == large { | |
@media (min-width: 1280px) { @content; } | |
} |
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 | |
$text = types_render_field("about-text", array("output"=>"raw")); | |
function truncate($text, $chars = 300) { | |
$text = $text." "; | |
$text = substr($text,0,$chars); | |
$text = substr($text,0,strrpos($text,' ')); | |
$text = $text."..."; | |
return $text; | |
} | |
$test = truncate($text); |
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
// Creates Login Shortcode | |
// Shortcode Usage: [loginform redirect="http://my-redirect-url.com"] | |
function pippin_login_form_shortcode( $atts, $content = null ) { | |
extract( shortcode_atts( array( | |
'redirect' => '' | |
), $atts ) ); | |
if (!is_user_logged_in()) { |