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
/** | |
* Customize Blog Query | |
* | |
*/ | |
function be_blog_query( $query ) { | |
if( $query->is_main_query() && !is_admin() && $query->is_home() ) { | |
$query->set( 'cat', 5 ); | |
} | |
} |
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 | |
//* Add sorting buttons | |
add_action('genesis_before_loop', 'ac_sort_buttons'); | |
function ac_sort_buttons() { | |
echo '<p>'; | |
echo 'Sort:'; | |
echo '<a href="?sort=oldest">Oldest</a>'; | |
echo '<a href="?sort=alpha">Alphabetical</a>'; |
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
** | |
* Customize Blog Query | |
* | |
*/ | |
function be_blog_query( $query ) { | |
if( $query->is_main_query() && !is_admin() && $query->is_home() ) { | |
$query->set( 'category_name', array( 'cat-1', 'cat-2', 'cat-3' ) ); | |
} | |
} | |
add_action( 'pre_get_posts', 'be_blog_query' ); |
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 | |
/** | |
* Blog Sidebar | |
* | |
*/ | |
function be_blog_sidebar() { | |
if( is_home() || is_archive() || is_singular( 'post' ) ) { | |
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); | |
if( function_exists( 'ss_do_sidebar' ) ) |
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
$display = is_home() || is_archive() || is_single(); | |
if( ! apply_filters( 'ja_blog_sidebar_display', $display ) ) | |
return; |
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
function ja_force_layout( $layout ) { | |
if ( is_home() || is_archive() || is_singular( 'post' ) ) { | |
$layout = 'full-width-content'; | |
} | |
} | |
add_action( 'genesis_pre_get_option_site_layout', 'ja_force_layout' ); |
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 | |
/** | |
* Global enqueues | |
* | |
* @since 1.0.0 | |
* @global array $wp_styles | |
*/ | |
function ea_global_enqueues() { | |
wp_enqueue_style( 'genericons', get_stylesheet_directory_uri() . '/css/genericons.css' ); |
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 | |
/** | |
* ACF Table Shortcode | |
* | |
*/ | |
function be_acf_table_shortcode( $value, $post_id, $field ) { | |
if( 'shortcode' !== $field['_name'] ) | |
return $value; | |
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 | |
/** | |
* Add Site Name as Body Class | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/wordpress-class-body-tag/ | |
* | |
* @param array $classes | |
* @return 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 | |
// add_image_size( size_name, width, height, crop (true/false) ); | |
add_image_size( 'be_portfolio', 400, 200, true ); |