Skip to content

Instantly share code, notes, and snippets.

View tomatillodesign's full-sized avatar

Chris Liu-Beers tomatillodesign

View GitHub Profile
<a href="http://www.codethedream.org" class="button" alt="Ready to learn more?">Click here to learn more about Code the Dream</a>
@tomatillodesign
tomatillodesign / php-workshop-quiz.php
Last active December 16, 2018 20:08
A short PHP quiz for CTD, Fall '18
<?php
// Question 5: ///////////////////////////////////////////////////////
// The following code will print "Chris" onto the webpage (True/False):
$name = '<h2>Chris</h2>';
// Question 6: ///////////////////////////////////////////////////////
@tomatillodesign
tomatillodesign / arod-assignment.php
Last active November 6, 2018 17:56
WP Template Work
<?php
/* Alex, here is your challenge:
1) Save this file and upload it to wp-content/themes/corporate-pro
You will want your code here to only apply to single sites. Use https://wphierarchy.com to determine the filename that you should use. It will be one of these:
a) single.php
b) page-sites.php
c) single-sites.php
d) sites-single.php
e) singular-sites.php
@tomatillodesign
tomatillodesign / sample-wp-query.php
Created November 2, 2018 00:45
Sample WP-Query
<?php
// Reference: https://codex.wordpress.org/Class_Reference/WP_Query
$args = array(
'post_type' => 'resource', // enter your custom post type or use 'post' for regular posts
'tax_query' => array( // see https://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters
array(
'taxonomy' => 'people',
'field' => 'slug',
@tomatillodesign
tomatillodesign / editor.css
Created August 2, 2018 23:35
Board Member Custom Gutenberg Block
.static-board-member {
text-align: center;
padding: 20px;
background: #eee;
border-radius: 8px;
}
.wp-block-clb-custom-blocks-board-member .static-board-member {
border: none;
}
@tomatillodesign
tomatillodesign / editor.css
Created August 2, 2018 13:17
Gutenberg Work
.wp-block-custom-blocks-iframe {
background: #eee;
border: 2px #ddd solid;
padding: 1rem;
padding-bottom: 0;
}
.clb-iframe-placeholder-area {
@tomatillodesign
tomatillodesign / clb-cpt.php
Created April 23, 2017 17:07
Custom Post Types plugin
<?php
/*
Plugin Name: Custom Post Types & Functionality
Description: Site specific code changes for WordCamp 2017 Test Site
Author: Chris Liu-Beers | Tomatillo Design
Author URI: http://www.tomatillodesign.com
Version: 1.1
*/
@tomatillodesign
tomatillodesign / functions.php
Created April 23, 2017 16:49
REST API Test - functions.php
<?php
/**
* Smart Passive Income Pro.
*
* This file adds functions to the Smart Passive Income Pro.
*
* @package Smart Passive Income Pro
* @author StudioPress
* @license GPL-2.0+
* @link http://www.studiopress.com/
<?php
/*
* CLB Custom Genesis search results page template
*
*/
// Use with SearchWP and also SearchWP Term Highlight plugins
add_action('genesis_after_header', 'clb_search_results', 14);
function clb_search_results() {
@tomatillodesign
tomatillodesign / supereditor.php
Created February 2, 2017 21:04
Super Editor simple plugin
<?php
/*
Plugin Name: SuperEditor
Description: Create New Role for Safe WordPress Editing
Author: Chris Liu-Beers | Tomatillo Design
Author URI: http://www.tomatillodesign.com
Version: 1.0
*/
// For Testing, remove the role and then add it back