Skip to content

Instantly share code, notes, and snippets.

@selenastrain
selenastrain / meta-box-example.php
Created February 25, 2014 21:03
A meta box example that adds an additional WYSIWYG editor to a custom post type in WordPress.
<?php
/**
* Meta box example using wp_editor and a custom post type
* The registered post type name is product and we're adding a sample meta box to it
* This is the basic method that I have used before when I needed to add an additional WYSIWYG editor
*
* Reference:
* https://codex.wordpress.org/Function_Reference/wp_editor
* http://codex.wordpress.org/Function_Reference/register_post_type
* http://codex.wordpress.org/Function_Reference/add_meta_box
@selenastrain
selenastrain / custom-query-example.php
Created August 6, 2012 16:43
Custom taxonomy query example
<?php
$args = array(
'tax_query' => array(
array(
'taxonomy' => 'people',
'field' => 'slug',
'terms' => 'bob'
)
),
'order' => 'ASC',