Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Section Title
*
*/
function be_section_title() {
$section_info = array( 'title' => '', 'subtitle' => '', 'title_url' => '', 'subtitle_url' => '' );
<?php
/**
* Template Name: Category Listing
*
* @package BE_Genesis_Child
* @since 1.0.0
* @link https://github.com/billerickson/BE-Genesis-Child
* @author Bill Erickson <[email protected]>
* @copyright Copyright (c) 2011, Bill Erickson
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
/** Add Project Information After Content */
add_action ( 'genesis_sidebar', 'mmi_sing_project_side' );
function mmi_sing_project_side() {
global $wp_query;
$participants = $wp_query->post->ID;
echo '<div class="mmi-sidebar">';
echo '<section class="widget">';
echo '<h4 class="widgettitle">Participate In This Project</h4>';
<?php
// Remove Visual_Subtitle filter
remove_filter( 'the_title', array( Visual_Subtitle::$instance, 'filter' ) );
add_action( 'genesis_after_post_title', 'wps_subtitle' );
/**
* Adds the subtitle to genesis_after_post_title.
* No need to rebuild admin portion since WP doesn't recognize it anyways.
*/
function wps_subtitle() {
<?php
/* Template Name: Grid Archive */
/**
* Category Loop
*
*/
function be_category_loop() {
global $post, $wp_query;
$args = array(
<?php
// Display artwork info in post, below post content
add_filter('thematic_post', 'display_artwork_info');
function display_artwork_info() {
global $artworkinfo_metabox;
echo the_content();
@jamiemitchell
jamiemitchell / gist:7002633
Last active December 25, 2015 15:59 — forked from envex/gist:485558
<?php
$key = get_post_meta($post->ID, 'your-key', true) ? get_post_meta($post->ID, 'your-key', true) : 'No Key, try again!';
echo $key;
<?php
if( get_post_meta( get_the_ID(), 'diww_sponsored', true ) == 'sponsored' ) {
if( get_post_meta( get_the_ID(), 'diww_sponsored_type', true ) == 'giveaway' ) {
$sponsored_content = '<p class="sponsored">This is a sponsored giveaway.</p>';
$sponsored_content .= $content;
return $sponsored_content;
}
if( get_post_meta( get_the_ID(), 'diww_sponsored_type', true ) == 'review' ) {
$sponsored_content = '<p class="sponsored">This is a sponsored review.</p>';
<?php
$contact_name = get_post_meta(get_the_ID(), 'secondary-contact-name', true);
if(!empty($contact_name)):
?>
<dt>Secondary contact</dt>
<dd><?php echo apply_filters('the_content', $contact_name); ?></dd>
<dd><?php echo apply_filters('the_content', get_post_meta(get_the_ID(), 'secondary-contact-phone', true)); ?></dd>