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 post info/meta on products category pages | |
------------------------------------------------------------ */ | |
add_action('genesis_before','remove_post_info_meta'); | |
function remove_post_info_meta() { | |
if ( in_category('products')) { | |
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 | |
add_action( 'genesis_before_loop', 'child_maybe_do_grid_loop' ); | |
function child_maybe_do_grid_loop() { | |
// Amend this conditional to pick where this grid looping occurs | |
if ( is_page('2') ) { | |
remove_action('genesis_before_post_content', 'genesis_post_info'); |
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 | |
remove_action ('genesis_loop', 'genesis_do_loop'); | |
add_action( 'genesis_loop', 'jm_custom_do_loop' ); | |
function jm_custom_do_loop() { | |
$args = array( | |
'post_type' => 'product', | |
'order_by' => '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
<?php | |
/** | |
* Creating the product listing custom post type | |
*/ | |
function product_listing() { | |
$labels = array( | |
'name' => __('Products', 'post type general name'), | |
'singular_name' => __('Product', 'post type singular name'), | |
'add_new' => _x('Add New', 'Product'), |
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
/* Center simple social icons | |
-------------------------------------------- */ | |
body .simple-social-icons .alignleft, | |
body .simple-social-icons .alignright { | |
float: none; | |
text-align: center; | |
} |
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 | |
/* Creating the product listing custom post type | |
------------------------------------------------------------ */ | |
function product_listing() { | |
$labels = array( | |
'name' => __('Products', 'post type general name'), | |
'singular_name' => __('Product', 'post type singular name'), | |
'add_new' => _x('Add New', 'Product'), |