Skip to content

Instantly share code, notes, and snippets.

@scottnix
scottnix / gist:9865875
Last active August 29, 2015 13:57
WordPress and Compass config.rb example
# compass config.rb refrences - http://compass-style.org/help/tutorials/configuration-reference/
# path to file structures
http_path = "/"
css_dir = "/"
sass_dir = "/scss"
images_dir = "/images"
fonts_dir = "/fonts"
javascripts_dir = "/js"
@scottnix
scottnix / gist:ab2f48885670b99af910
Created May 10, 2014 18:00
Thematic Theme Comprehensive Favicons
// reference: http://scottnix.com/2014-thematic-child-theme/#comment-53413
function childtheme_add_favicon() { ?>
<link rel="shortcut icon" href="/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="/apple-touch-icon-152x152-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144x144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="/apple-touch-icon-120x120-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/apple-touch-icon-114x114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="/apple-touch-icon-76x76-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/apple-touch-icon-72x72-precomposed.png">
@scottnix
scottnix / gist:d08ecdb091582cc046ca
Created June 20, 2014 01:16
Thematic Theme Add Logo Image to Header
function childtheme_override_blogtitle() {
?>
<div id="blog-title" class="site-title">
<span>
<a href="<?php echo home_url() ?>/" title="<?php bloginfo('name') ?>" rel="home">
<img src="http://placekitten.com/300/150">
</a>
</span>
</div>
@scottnix
scottnix / functions.php
Created June 20, 2014 05:14
Thematic Category Styling Example
// changes the "Page Title" on Categories to Blog
function childtheme_page_title($content) {
if ( is_category('') ) {
// if ( is_category('aciform') ) { // if you want to target a specific category, target it by name 'aciform'
$content = '<h1 class="page-title">';
// $content .= ' <span>' . single_cat_title('', FALSE) .'</span>'; // calls the actual category name, if you need it for something
$content .= ' <span>Blog</span>';
$content .= '</h1>' . "\n";
}
return $content;
@scottnix
scottnix / gist:7f0175ba607117b1e139
Created July 25, 2014 21:59
Bootstrap.js files required for dropdown menu
/* ========================================================================
* Bootstrap: dropdown.js v3.2.0
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
@scottnix
scottnix / gist:a6fd7fd6fda2cab56e41
Created July 27, 2014 05:54
Sass for Bootstrap 3 Dropdown Menu
//
// Bootstrap 3 Variables
// This is an incomplete list of bootstrap variables, lists only what pertains to the dropdown menu and various possible options.
//
//== Colors
//
//## Gray and brand colors for use across Bootstrap.
@scottnix
scottnix / gist:4ffda6c4eb11be1b6a7d
Created September 12, 2014 05:39
Thematic Theme WordPress SEO Breadcrumbs
function childtheme_yoast_seo_breadcrumbs() {
if ( is_page() && function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb('<p id="breadcrumbs">','</p>');
}
}
add_action('thematic_abovecontainer', 'childtheme_yoast_seo_breadcrumbs');
@scottnix
scottnix / email body
Last active August 29, 2015 14:17
Contact Form 7
From: [your-name] <[your-email]>
Website: [your-website]
Message Body:
[your-message]
--
This e-mail was sent from a contact form on Scott Nix (http://scottnix.com)
@scottnix
scottnix / gist:d7cce2dce70fe3915b0e
Created July 13, 2015 20:32
Move Thematic Menu to the Top
// remove menu from current position
function childtheme_move_access() {
remove_action('thematic_header', 'thematic_access', 9);
}
add_action('thematic_child_init', 'childtheme_move_access');
// add menu back into the same header, but on a different priority
add_action('thematic_header', 'thematic_access', 0);
@scottnix
scottnix / gist:48f0f3091672e97ff659
Created July 14, 2015 05:31
Thematic Header Image Link
#blog-title a {
display: block;
height: 200px;
width: 100%;
background: url('http://localhost/githubs/test/wp-content/uploads/sites/12/2015/07/cropped-300.jpg');
margin: 0;
padding: 0;
text-indent: -9999px; /* hides blog name, remove if you want the blog text */
}
#blog-description {