Skip to content

Instantly share code, notes, and snippets.

Scott Nix scottnix

Block or report user

Report or block scottnix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@scottnix
scottnix / svg.php
Created Sep 19, 2015
Thematic Theme SVG Icons
View svg.php
// override post footer to add SVG icons, pulls from /icon/ folder inside the child theme
function childtheme_override_postfooter() {
$post_type = get_post_type();
$post_type_obj = get_post_type_object($post_type);
$tagsection = get_the_tags();
// Display nothing for "Page" post-type
if ( $post_type == 'page' ) {
$postfooter = '';
@scottnix
scottnix / gist:48f0f3091672e97ff659
Created Jul 14, 2015
Thematic Header Image Link
View gist:48f0f3091672e97ff659
#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 {
@scottnix
scottnix / gist:d7cce2dce70fe3915b0e
Created Jul 13, 2015
Move Thematic Menu to the Top
View gist:d7cce2dce70fe3915b0e
// 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 / email body
Last active Aug 29, 2015
Contact Form 7
View email body
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:4ffda6c4eb11be1b6a7d
Created Sep 12, 2014
Thematic Theme WordPress SEO Breadcrumbs
View gist:4ffda6c4eb11be1b6a7d
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 / gist:026c7d32d32ae698503f
Created Jul 27, 2014
CSS for Bootsrap 3 Dropdown Menu
View gist:026c7d32d32ae698503f
.nav {
margin-bottom: 0;
padding-left: 0;
list-style: none;
}
.nav > li {
position: relative;
display: block;
}
.nav > li > a {
@scottnix
scottnix / gist:a6fd7fd6fda2cab56e41
Created Jul 27, 2014
Sass for Bootstrap 3 Dropdown Menu
View gist:a6fd7fd6fda2cab56e41
//
// 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:7f0175ba607117b1e139
Created Jul 25, 2014
Bootstrap.js files required for dropdown menu
View gist:7f0175ba607117b1e139
/* ========================================================================
* 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 / functions.php
Created Jun 20, 2014
Thematic Category Styling Example
View functions.php
// 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:d08ecdb091582cc046ca
Created Jun 20, 2014
Thematic Theme Add Logo Image to Header
View gist:d08ecdb091582cc046ca
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>
You can’t perform that action at this time.