Skip to content

Instantly share code, notes, and snippets.

@bob-moore
bob-moore / blockquotes.html
Last active October 12, 2016 16:59
MPress Style Guide
<blockquote>
<p>Stay hungry. Stay foolish.</p>
</blockquote>
<blockquote>
<p>People think focus means saying yes to the thing you've got to focus on. But that's not what it means at all. It means saying no to the hundred other good ideas that there are. You have to pick carefully. I'm actually as proud of the things we haven't done as the things I have done. Innovation is saying no to 1,000 things.</p>
<footer><cite>Steve Jobs</cite> - Apple Worldwide Developers' Conference, 1997</footer>
</blockquote>
@bob-moore
bob-moore / Markup.php
Created September 8, 2016 17:10
Sticky Sidebar
<div id="primary">
<div id="main" class="column md-8">
<!-- Main Content Here -->
</div>
<div id="sidebar" class="column md-4">
<div id="not-sticky-widget-area">
<!-- Put not sticky sidebar here -->
</div>
<div id="sticky-widget-area">
<!-- Put sticky sidebar here -->
@bob-moore
bob-moore / gruntfile.js
Last active August 18, 2016 14:23
Grunt Configuration for Mpress w/ SCSS
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-newer');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-openport');
grunt.loadNpmTasks('grunt-contrib-watch');
@bob-moore
bob-moore / Bones List.md
Last active September 14, 2016 14:03
Grunt Configuration for Bones With LESS
Theme Number Name
1 Pilot
2 The Man in the S.U.V.
3 A Boy in a Tree
4 The Man in the Bear
5 A Boy in a Bush
6 The Man in the Wall
7 A Man on Death Row
8 The Girl in the Fridge
@bob-moore
bob-moore / jptweaks.php
Created June 13, 2016 14:15
Jetpack Sharing Display Tweaks
<?php
/**
* Filter to stop jetpack from automatically inserting like buttons, so we can
* manually control their output
*/
if( !function_exists( 'jptweak_remove_share' ) ) {
function jptweak_remove_share() {
remove_filter( 'the_content', 'sharing_display',19 );
remove_filter( 'the_excerpt', 'sharing_display',19 );
if ( class_exists( 'Jetpack_Likes' ) ) {
@bob-moore
bob-moore / Readme.txt
Last active June 6, 2016 16:58
Related Navigation in Wordpress
Purpose: Display navigation of a pages siblings and children.
1. Children / Grandchildren of SIBLING top level pages are hidden (visually)
2. All top level pages are visible, and the navigation down to 1 level below the current page
2. Items are not expandable, the purpose is not to provide a full navigation menu, instead the goal is to provide links Nth levels up, and 1 level down the navigational tree.
In this way, as pages are added / removed from the site, they are automatically represented in the related navigation tree.
@bob-moore
bob-moore / customizer.php
Last active June 2, 2016 19:01
Default Featured Images
<?php
/**
* mpress Theme Customizer.
* @package mpress
*/
class Mpress_Theme_Customizer {
private $sections;
private $settings;
private $controls;
@bob-moore
bob-moore / .txt
Created May 31, 2016 13:15
.htaccess Code Samples
## Permanently Redirect Entire Domain
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.net/$1 [L,R=301,NC]
@bob-moore
bob-moore / bands_loop.php
Created May 26, 2016 15:26
Wordpress loop for bands post type
<main id="main" class="site-main" role="main">
<?php
// WP_Query arguments
$args = array (
'post_type' => array( 'band' ),
'post_status' => array( 'publish' ),
'nopaging' => true,
'posts_per_page' => '-1',
'order' => 'ASC',
'orderby' => 'menu_order',
@bob-moore
bob-moore / sample.html
Last active June 8, 2016 17:18
Toggle Element inside clickable div
<div class="togglevisible" data-click-target=".inner">
<p>alksjdfkajsdfkaskdfj</p>
<div class="inner">
<p>this is a paragraph</p>
<a href="http://google.com" target="_blank">link</a>
</div>
</div>