Skip to content

Instantly share code, notes, and snippets.

@jamiemitchell
jamiemitchell / archive-testimonials.php
Created May 22, 2013 03:37 — forked from cdils/archive-testimonials.php
Needs updating to Genesis 2.0
<?php
/**
* Template Name: Testimonial Archives
* Description: Used as a page template to show page contents, followed by a loop through a CPT archive
*/
remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop
add_action( 'genesis_loop', 'custom_do_loop' ); // Add custom loop
/**
* Auto-generate taxonomy title for archive pages
*
* Will say "[Term] Archives"
*
*/
add_action( 'genesis_before_loop', 'ac_do_taxonomy_title_description', 20 );
function ac_do_taxonomy_title_description() {
<?php
/**
* Customize Product Category Query
* @link http://www.billerickson.net/customize-the-wordpress-query/
*/
function be_product_category_query( $query ) {
if( $query->is_main_query() && !is_admin() && $query->is_tax( 'product-category' ) ) {
$query->set( 'orderby', 'title' );
function staff_do_grid_loop() {
$args = array(
'post_type' => 'page',
'meta_key' => 'staff',
'posts_per_page'=> 4,
'orderby' => 'menu_order',
'order' => 'ASC',
'paged' => get_query_var( 'paged' ),
);
<?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();