View functions.php
<?php
//* Do NOT include the opening php tag
//* Exclude categories from blog homepage
add_action( 'pre_get_posts', 'bg_exclude_categories' );
function bg_exclude_categories( $query ) {
if( $query->is_main_query() && $query->is_home() ) {
$query->set( 'cat', '-5,-7' );
}
View sample.css
/* Heart Icon
--------------------------------------------- */
.site-footer .icon {
font-size: 20px;
}
.site-footer .love .icon {
font-size: 12px;
margin-left: 2px;
View sample.html
<p class="love">Made with <i class="icon ion-heart"></i> by Brian Gardner</p>
View sample.css
/* Ionicons
--------------------------------------------- */
.site-footer p.social a {
border: 1px solid #949792;
border-radius: 50%;
color: #949792;
display: inline-block;
height: 42px;
margin-left: 10px;
View sample.html
<p class="social">
<a href="http://twitter.com/bgardner"><i class="icon ion-social-twitter"></i></a>
<a href="http://www.facebook.com/bgardner"><i class="icon ion-social-facebook"></i></a>
<a href="http://instagram.com/bgardner"><i class="icon ion-social-instagram-outline"></i></a>
<a href="http://dribbble.com/bgardner"><i class="icon ion-social-dribbble-outline"></i></a>
</p>
View functions.php
<?php
//* Do NOT include the opening php tag
//* Enqueue Ionicons
add_action( 'wp_enqueue_scripts', 'bg_enqueue_ionicons' );
function bg_enqueue_ionicons() {
wp_enqueue_style( 'ionicons', '//code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css', array(), CHILD_THEME_VERSION );
}
View style.css
/* Comment Policy
---------------------------------------------------------------------------------------------------- */
.comment-policy {
border: 1px solid #edeeee;
padding: 20px 30px;
}
.comment-policy p:last-child {
margin-bottom: 0;
View functions.php
<?php
//* Do NOT include the opening php tag
//* Add Comment Policy widget area before comment form
add_action( 'genesis_comment_form', 'bg_comment_policy', 5 );
function bg_comment_policy() {
genesis_widget_area( 'comment-policy', array(
'before' => '<div class="comment-policy"><div class="wrap">',
'after' => '</div></div>',
View functions.php
<?php
//* Do NOT include the opening php tag
//* Register Comment Policy widget area
genesis_register_sidebar( array(
'id' => 'comment-policy',
'name' => __( 'Comment Policy', 'bg' ),
'description' => __( 'This is the comment policy widget area.', 'bg' ),
) );
View functions.php
<?php
//* Do NOT include the opening php tag
//* Remove pages from search results
add_filter( 'pre_get_posts', 'bg_search_exclude' );
function bg_search_exclude($query) {
if ($query->is_search) {
$query->set('post_type', 'post');
}