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 | |
/** | |
* Modify Blog Query | |
* | |
*/ | |
function be_blog_query( $query ) { | |
if( $query->is_main_query() && $query->is_home() && !is_admin() ) { | |
// customize blog query here | |
$query->set( 'posts_per_page', 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
<?php | |
/** | |
* Exclude issues from blog | |
* | |
*/ | |
function be_blog_query( $query ) { | |
if( $query->is_main_query() && $query->is_home() && !is_admin() ) { | |
$terms = get_terms( 'issue-date' ); | |
$terms = wp_list_pluck( $terms, 'term_id' ); |
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
/** | |
* Add category as class to display posts shortcode | |
* | |
*/ | |
function be_dps_category_class( $classes, $post ) { | |
$categories = get_the_terms( $post->ID, 'category' ); | |
foreach( $categories as $category ) | |
$classes[] = 'cat-' . $category->slug; | |
return $classes; | |
} |
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
/** | |
* Excerpt More Link | |
* | |
*/ | |
function be_excerpt_more( $more ) { | |
return ' … <a href="' . get_permalink() . '">Read More</a>'; | |
} | |
add_filter( 'excerpt_more', 'be_excerpt_more', 99 ); | |
add_filter( 'get_the_content_more_link', 'be_excerpt_more', 99 ); |
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 Tips to Blog | |
* | |
*/ | |
function be_tips_in_blog( $query ) { | |
if( $query->is_main_query() && !is_admin() && ( $query->is_home() || $query->is_tag() || $query->is_category() ) ) | |
$query->set( 'post_type', array( 'post', 'tips' ) ); | |
} |
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
<form method="get" class="searchform search-form" action="http://www.billerickson.net/" role="search"> | |
<input type="text" value="Search" name="s" class="s search-input"> | |
<input type="hidden" name="post_type" value="diseases"> | |
<input type="submit" class="searchsubmit search-submit" value="Submit"> | |
</form> |
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
/** | |
* Add Podcasts to Blog | |
* | |
*/ | |
function be_blog_query( $query ) { | |
if( $query->is_main_query() && !is_admin() && $query->is_home() ) { | |
$query->set( 'post_type', array( 'post', 'podcast' ) ); | |
} | |
} | |
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 | |
function be_custom_loop() { | |
$loop = new WP_Query( $args ); | |
if( $loop->have_posts() ): while( $loop->have_posts() ): $loop->the_post(); | |
$classes = 0 == $loop->current_post || 0 == $loop->current_post % 2 ? 'one-half first' : 'one-half'; | |
echo '<div class="' . $classes . '">' . get_the_title() . '</div>'; | |
endwhile; endif; wp_reset_postdata(); | |
} |
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 be_change_sidebar_order() { | |
$site_layout = genesis_site_layout(); | |
if ( 'sidebar-content' == $site_layout ) { | |
// Remove the Primary Sidebar from the Primary Sidebar area. | |
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); | |
// Place the Secondary Sidebar into the Primary Sidebar area. | |
add_action( 'genesis_sidebar', 'genesis_do_sidebar_alt' ); |
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
#header ul.nav li a:hover, | |
#header ul.nav li a:active, | |
#header ul.nav .current_page_item a, | |
#header ul.nav .current-cat a, | |
#header ul.nav .current-menu-item a, | |
#header ul.menu li a:hover, | |
#header ul.menu li a:active, | |
#header ul.menu .current_page_item a, | |
#header ul.menu .current-cat a, | |
#header ul.menu .current-menu-item a, |
OlderNewer