Skip to content

Instantly share code, notes, and snippets.

Mannie Schumpert mannieschumpert

Block or report user

Report or block mannieschumpert

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
mannieschumpert / gist:3109226
Created Jul 14, 2012
WordPress: Custom Taxonomy
View gist:3109226
// Create *_ taxonomy
add_action( 'init', 'create_TAXONOMYNAME' );
function create_TAXONOMYNAME() {
$labels = array(
'name' => _x( 'PLURAL', 'taxonomy general name' ),
'singular_name' => _x( 'SINGULAR', 'taxonomy singular name' ),
'search_items' => __( 'Search PLURAL' ),
'all_items' => __( 'All PLURAL' ),
'parent_item' => __( 'Parent SINGULAR' ),
mannieschumpert / gist:3135852
Created Jul 18, 2012
WordPress: Get Author Bio by ID
View gist:3135852
// the number is the author ID
<?php $author = get_userdata(2); echo $author->user_description; ?>
mannieschumpert / gist:3269678
Created Aug 6, 2012
"Add More Wow" via Dan Cederholm at Build 2010
View gist:3269678
/* The next time you hear "needs more wow," add this to the stylesheet.
- Dan Cederholm at Build Conference 2010 */
*:hover {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
-o-transform: rotate(180deg);
transform: rotate(180deg);
mannieschumpert / gist:3815767
Last active Oct 11, 2015
WordPress Taxonomy Snippet for Sublime Text
View gist:3815767
// Create taxonomy
add_action( 'init', 'create_${1:FUNCTION}' );
function create_${1:FUNCTION}() {
\$labels = array(
'name' => _x( '${3:PLURAL}', 'taxonomy general name' ),
'singular_name' => _x( '${2:SINGULAR}', 'taxonomy singular name' ),
'search_items' => __( 'Search ${3:PLURAL}' ),
mannieschumpert / gist:3819133
Created Oct 2, 2012 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts
View gist:3819133

Sublime Text 2 – Useful Shortcuts (Mac OS X)


⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
mannieschumpert / gist:4018296
Created Nov 5, 2012
Remove "Preview" button from Custom Post type edit page
View gist:4018296
// Hide "Preview" button
function hide_preview_button()
global $current_screen;
if ( 'CUSTOM_POST_TYPE' == $current_screen->post_type ) {
echo '<style>#preview-action,.updated a{display:none;}</style>';
add_action('admin_head', 'hide_preview_button');
mannieschumpert / twentytwelve.sass
Last active Oct 13, 2015
TwentyTwelve Sass-ified
View twentytwelve.sass
/* In making a child theme of Twenty Twelve, I didn't want to use the standard @import in the production CSS.
* Since I'm using Sass, I "Sass-ified" Twenty Twelve so that it could be imported directly into my own stylesheet.
* This way it can be minifed, and I can save an http request. Double win.
* I removed a lot of comments, because the .sass syntax is really particular about formatting.
* I preserved the line numbering just in case the files needed comparing (thus all the blank lines).
* (FYI, I'm enqueueing a different stylesheet in the theme files than the one that identifies the theme.)
mannieschumpert / gist:4587131
Last active Dec 11, 2015
Just for showing an example on
View gist:4587131
// Sass v3.2.5
// Compass v0.13.alpha.0
+transition(all, 0.3s)
@include box-sizing(border-box)
@include border-radius(4px)
mannieschumpert / gist:4760522
Last active Dec 12, 2015
An example of dequeueing a parent theme (in this case TwentyTwelve) to include your own.
View gist:4760522
function replace_twentytwelve_styles() {
wp_dequeue_style( 'twentytwelve-style' );
wp_deregister_style( 'twentytwelve-style' );
wp_enqueue_style( 'my-style', get_stylesheet_directory_uri() . '/css/style.css' );
add_action( 'wp_enqueue_scripts', 'replace_twentytwelve_styles', 11 );
mannieschumpert / gist:5026289
Last active Dec 14, 2015
Bash function for installing WordPress
View gist:5026289
wp() {
# Needs two parameters
# Parameter 1 is the account name, or install directory
# Parameter 2 will set the database password
cd ~/../home/${1}/public_html # go to install directory
wget # get latest WordPress
tar xfz latest.tar.gz # unpack
chown -R ${1} wordpress # change all files in wordpress to be owned by user (solves a problem when installing as root)
chgrp -R ${1} wordpress # change associated group (solves a problem when installing as root)
mv wordpress/* ./ # move all files from /wordpress to the root directory
You can’t perform that action at this time.