This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' ), | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Section Title | |
* | |
*/ | |
function be_section_title() { | |
$section_info = array( 'title' => '', 'subtitle' => '', 'title_url' => '', 'subtitle_url' => '' ); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** 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>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Template Name: Grid Archive */ | |
/** | |
* Category Loop | |
* | |
*/ | |
function be_category_loop() { | |
global $post, $wp_query; | |
$args = array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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(); | |