Skip to content

Instantly share code, notes, and snippets.

View luetkemj's full-sized avatar
🌄
Working from home

Mark Luetke luetkemj

🌄
Working from home
View GitHub Profile
@luetkemj
luetkemj / gist:2002921
Created March 8, 2012 19:41
WP: Plugin Header
/*
Plugin Name:
Plugin URI: http://luetkemj.com/
Description:
Author: Mark Luetke
Author URI: http://luetkemj.com
Version: 1.0
*/
@luetkemj
luetkemj / gist:2007213
Created March 9, 2012 15:54
HTML: Abbreviated Template
<!DOCTYPE html>
<title>HTML5 abbr</title>
<meta charset=utf-8>
<h1>That's it!</h1>
<ul>
<li>Really?
<li>Really.
</ul>
@luetkemj
luetkemj / style.css
Created March 9, 2012 16:32
WP-CSS: Wordpress classes
/* =============================================================================
WordPress WYSIWYG Editor Styles
========================================================================== */
.entry-content img {
margin: 0 0 1.5em 0;
max-width: 100%;
height: auto;
}
.alignleft, img.alignleft {
@luetkemj
luetkemj / wp-query-ref.php
Last active April 25, 2024 09:37
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@luetkemj
luetkemj / gist:2031976
Created March 13, 2012 21:50 — forked from bekapod/gist:2017562
CSS: Inline Block Hack
.inline-block {
display: inline-block;
/* IE7 hack to mimic inline-block on block elements */
*display: inline;
*zoom: 1;
}
@luetkemj
luetkemj / quicktemplate.html
Created April 5, 2013 19:37
HTML: Quick Template
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The HTML5 Herald</title>
<meta name="description" content="Quick Template">
<meta name="author" content="luetkemj">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
@luetkemj
luetkemj / gist:5ac8aebc9bc498409c09
Created June 30, 2014 14:40
increase ulimit mac osx
##too many open files error when installing gulp for google's web starter. This did the trick
ulimit -n 1048
<?php
/* =============================================================================
MCE FILTERS
========================================================================== */
/**
http://wp.tutsplus.com/tutorials/theme-development/adding-custom-styles-in-wordpress-tinymce-editor/
*
inline
Name of the inline element to produce for example “span”. The current text selection will be wrapped in this inline element.
<div class="pattern" id="demo-pattern.variant">
<details class="pattern-details">
<summary class="pattern-name">
demo-pattern.variant <a class="pattern-link" rel="bookmark" href="" title="View just this pattern">#</a>
</summary>
<code class="pattern-markup language-markup">
<!-- github gists or possibly a grunt task to highlight markup here... -->
</code>
@luetkemj
luetkemj / gist:a8a0b317cb58ed5ec136
Last active August 29, 2015 14:23
Create category on WPMS blog from another blog in the same network.
<?php
// current blog
$switch_from = get_current_blog_id();
// blog id we are switching to so we can create a category there
$switch_to = 2;
echo 'About to switch to '.$switch_to.' from '. $switch_from.'.';
// https://codex.wordpress.org/WPMU_Functions/switch_to_blog
switch_to_blog( $switch_to );