Skip to content

Instantly share code, notes, and snippets.

View joecue's full-sized avatar
🎯
Focusing

Joe Querin joecue

🎯
Focusing
View GitHub Profile
@joecue
joecue / demo-plugin.php
Created July 17, 2015 18:38
Recipe Custom Post Type Plugin
<?php
/*
Plugin Name: Site Plugin for WordCamp Columbus 2015
Description: Site specific code changes for example.com
*/
/* Start Adding Functions Below this Line */
// Hook into the 'init' action
add_action( 'init', 'demo_post_types', 0 );
@joecue
joecue / WP_Related_Post.php
Created June 12, 2015 15:25
WordPress Related Post Code without need of plugin - Grabbed from http://jointswp.com/wordpress-related-posts-without-plugin/
<?php
// Related Posts Function, matches posts by tags - call using joints_related_posts(); )
function joints_related_posts() {
global $post;
$tags = wp_get_post_tags( $post->ID );
if($tags) {
foreach( $tags as $tag ) {
$tag_arr .= $tag->slug . ',';
}
$args = array(
@joecue
joecue / json-example.html
Created May 19, 2015 20:53
Sample JSON File Reading WP API Call
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>