This file contains 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 | |
/** | |
* Portfolio Template for Taxonomies | |
* | |
*/ | |
function be_portfolio_template( $template ) { | |
if( is_tax( array( 'portfolio_category', 'portfolio_tag' ) ) ) | |
$template = get_query_template( 'archive-portfolio' ); |
This file contains 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 | |
/** | |
* Portfolio Archive | |
* | |
*/ | |
/** | |
* Display as Columns | |
* | |
*/ |
This file contains 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 Blog Query | |
* | |
*/ | |
function be_blog_query( $query ) { | |
if( $query->is_main_query() && !is_admin() && $query->is_home() ) { | |
$tax_query = array( | |
array( |
This file contains 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 | |
/** | |
* Get Page Hierarchy | |
* | |
* returns array | |
* -- pages (all pages in order) | |
* -- prev (previous page) | |
* -- next (next page) | |
* |
This file contains 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
$reviews = get_post_meta( get_the_ID(), '_lc_recipe_testerschoice', true ); | |
if ( empty( $reviews ) || empty( $reviews[0]['name'] ) || intval( $reviews[0]['name'] ) === 0 ) | |
return; | |
echo '<div class="recipe-testers">'; | |
lc_section_title( 'Testers Choice', 'h3', true, '', '' ); | |
foreach( $reviews as $review ) { |
This file contains 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
if( class_exists( 'Genesis_Simple_Share_Front_End' ) ) { | |
$plugin = new Genesis_Simple_Share_Front_End; | |
add_action( 'wp_enqueue_scripts', array( $plugin, 'load_scripts' ) ); | |
} |
This file contains 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 | |
/** | |
* Adds the hook Jared wants | |
* | |
*/ | |
function be_make_jared_happy() { | |
do_action( 'genesis_actual_header_right' ); | |
} | |
add_action( 'genesis_header', 'be_make_jared_happy', 12 ); |
This file contains 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
$today = getdate(); | |
$args = array( | |
'posts_per_page' => 5, | |
'orderby' => 'rand', | |
'date_query' => array( | |
array( | |
'year' => $today["year"], | |
'month' => $today["mon"], | |
'day' => $today["mday"], | |
), |
This file contains 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
if ( $query->is_home() && $query->is_main_query() ) { | |
$posts_per_page = 8; | |
$page = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 0; | |
$query->set( 'offset', 5 + $posts_per_page * $page ); | |
$query->set( 'posts_per_page', $posts_per_page ); | |
} |
This file contains 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 | |
/** | |
* Update Contact Methods | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/code/add-remove-contact-methods/ | |
*/ | |
function be_contact_methods( $contactmethods ) { | |
$remove = array( 'aim', 'yim', 'jabber' ); |