Skip to content

Instantly share code, notes, and snippets.

@kjpro27
kjpro27 / Modern web dev tools
Created April 17, 2014 14:23
Modern web dev tools
http://tooling.github.io/book-of-modern-frontend-tooling/dependency-management/bower/introduction.html
@kjpro27
kjpro27 / shortcode in custom field filter
Last active December 18, 2015 11:19
Execute a shortcode inside standard Wordpress custom field
<?php echo apply_filters('the_content', get_post_meta($post->ID, 'your_custom_field_here', true)); ?>

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/query.php
*/
$args = array(
<?php /* Not as simple as it sounds */ ?>
<div class="side-nav">
<div class="holder">
<ul>
<?php
if (isset($post->post_parent) && $post->post_parent > 0) {
$permalink = get_permalink($post->post_parent);
$parent_title = get_the_title($post->post_parent);
print('<li class="page_item page-parent"><a href="'.$permalink.'">'.$parent_title.'</a></li>');
$parent = $post->post_parent;