Skip to content

Instantly share code, notes, and snippets.

@eddiemoya
eddiemoya / resultslist-archive.php
Created September 14, 2012 20:52
resultslist archive.php
<?php
if(!is_ajax()) {
get_template_part('parts/header', 'results-list');
}
$post_type = get_query_var('post_type');
$post_type = (is_array($post_type)) ? $post_type[0] : $post_type;
loop('results-list', array($post_type, 'post'), 'parts', 'parts/no-results.php');
@eddiemoya
eddiemoya / git-move.sh
Last active October 10, 2015 17:28
Git Move (Stash Save, Checkout, Stash Apply in one command)
move = !git stash && git checkout $1 && git stash apply stash@{0} && wait
@eddiemoya
eddiemoya / custom-post-type.php
Created September 17, 2012 21:04
Example Custom Post Type
public function register_video_type() {
$labels = array(
'name' => _x('Video', 'post type general name'),
'singular_name' => _x('Video', 'post type singular name'),
'add_new' => _x('Add New', 'section'),
'add_new_item' => __('Add New Video'),
'edit_item' => __('Edit Video'),
'new_item' => __('New Video'),
'all_items' => __('All Videos'),
'view_item' => __('View Video'),
@eddiemoya
eddiemoya / gist:3740873
Created September 18, 2012 02:09 — forked from tim-steele/gist:3738582
Featured Category Questions
<article class="widget content-container featured-category-questions widget span12">
<header class="content-header">
<h1>Featured Questions</h1>
</header>
<section class="content-body clearfix">
<section class="span6">
<!-- DROPZONE: FIRST FEATURED QUESTION -->
<article class="content-container featured-post span12">
<header class="content-header">
<h3>Featured Blog Post</h3>
</header>
<section class="content-body clearfix">
<div class="featured-image span6">
<img src="/wp-content/uploads/2012/07/blogmodule.jpg">
</div>
@eddiemoya
eddiemoya / Featured Question.html
Created September 18, 2012 05:12 — forked from tim-steele/Featured Question
Featured Question
@eddiemoya
eddiemoya / Featured Category Questions.html
Created September 18, 2012 06:02 — forked from tim-steele/Featured Category Questions
Featured Category Questions
@eddiemoya
eddiemoya / wordpress-submodules.md
Created October 25, 2012 16:42
WordPress development file structure - submodules

** Note: folders containing .git files are meant to represent repositories. Repositories inside repositories are submodules.**

/SuperRepo /.git (#1) /ProjectRepo1 /.git (#2) /wp-config.php (#3) /WordPress /.git (#4) /plugins

@eddiemoya
eddiemoya / omniture-debugger-1.js
Created November 19, 2012 17:53
Bookmarklet omniture debugger #1
javascript:void(window.open(%22%22,%22stats_debugger%22,%22width=600,height=600,location=0,menubar=0,status=1,toolbar=0,resizable=1,scrollbars=1%22).document.write(%22<script language=\%22JavaScript\%22 src=\%22https://sitecatalyst.omniture.com/sc_tools/stats_debugger.html\%22></%22+%22script>%22 + %22<script language=\%22JavaScript\%22>window.focus();</script>%22));
@eddiemoya
eddiemoya / omniture-debugger-2.js
Created November 19, 2012 18:18
Omniture Debugger #2
javascript:void(window.open(%22%22,%22dp_debugger%22,%22width=600,height=600,location=0,menubar=0,status=1,toolbar=0,resizable=1,scrollbars=1%22).document.write(%22%3Cscript%20language=\%22JavaScript\%22%20id=dbg%20src=\%22http://www.digitalpulse.omniture.com/dp/debugger.js\%22%3E%3C/%22+%22script%3E%22));