Skip to content

Instantly share code, notes, and snippets.

View jrstaatsiii's full-sized avatar

Rich Staats jrstaatsiii

View GitHub Profile
@jrstaatsiii
jrstaatsiii / Excerpt by ID
Created August 20, 2012 20:02
Attempting to use Pippin's get excerpt by id
<div class="col col-1">
<?php $marketID = $data['ssm_market_post']; // Pull Post ID From SMOF ?>
<p class="go-to-market cat-header">Go To Market</p>
<h3><?php echo get_the_title($marketID); ?></h3>
<?php echo pippin_excerpt_by_id($marketID); ?>
@jrstaatsiii
jrstaatsiii / wpalchemy_checkbox.php
Created July 2, 2012 20:56
Featured Checkbox using WPAlchemy
// in metaboxes.php
// Featured Portfolio Metabox
<?php
$featured_portfolio_mb = new WPAlchemy_MetaBox(array
(
'id' => '_ssm_featured_meta',
'title' => 'Featured Portfolio Item',
'template' => SSM_DIR . '/lib/functions/wpalchemy/custom/featured_meta.php',
'context' => 'side',
@jrstaatsiii
jrstaatsiii / wpalchemy-hpslider.php
Created July 1, 2012 23:00
Home Page Slider with WPAlchemy
//In featured_meta.php
<div class="my_meta_control">
<p>
<?php $metabox->the_field('featured'); ?>
<input type="checkbox" name="<?php $metabox->the_name(); ?>" value="1" <?php if ($metabox->get_the_value()) echo ' checked="checked"'; ?>/> Add to Home Page Slider
</p>
</div>
//In home.php
<?php
@jrstaatsiii
jrstaatsiii / gist:2493933
Created April 25, 2012 22:15
Center Navigation with juery
<script type="text/javascript">
//determine navigation width for centering
jQuery(document).ready(function($) {
var width = 1;
$('ul.menu-primary li').each(function() {
width += $(this).outerWidth( true );
});
$('ul.menu-primary').css('width', width);
});
</script>
@jrstaatsiii
jrstaatsiii / p2p_drury
Created December 11, 2011 18:24
Attempt at Post 2 Post
<h2>Technology</h2>
<ul>
<?php
//Target The Client CPT & Taxonomy
$technology_args = array(
'post_type' => 'client',
'order_by' => 'title',
'order' => 'ASC',
'posts_per_page'=> '-1',
'tax_query' => array(
@jrstaatsiii
jrstaatsiii / p2p_drury
Created December 11, 2011 18:21
Attempt at Post 2 Post
<h2>Technology</h2>
<ul>
<?php
//Target The Client CPT & Taxonomy
$technology_args = array(
'post_type' => 'client',
'order_by' => 'title',
'order' => 'ASC',
'posts_per_page' => '-1',
'tax_query' => array(