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: Google CSE */ | |
//* Force Full-Width Layout | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
//* Remove Genesis breadcrumbs | |
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); |
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
//* Alter the Genesis Search to change the destination page and our querystring parameter. | |
add_filter( 'genesis_search_form', 'leaguewp_search_form', 10, 4); | |
function leaguewp_search_form( $form, $search_text, $button_text, $label ) { | |
$onfocus = " onfocus=\"if (this.value == '$search_text') {this.value = '';}\""; | |
$onblur = " onblur=\"if (this.value == '') {this.value = '$search_text';}\""; | |
$form = '<form role="search" method="get" class="searchform search-form" action="' . home_url() . '/search"> | |
<label class="search-form-label screen-reader-text" for="q">Search this website</label> | |
<input type="text" value="' . esc_attr( $search_text ) . '" name="q" id="q" class="s search-input"' . $onfocus . $onblur . ' /> | |
<input type="submit" class="searchsubmit search-submit" value="' . esc_attr( $button_text ) . '" /> |
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
/* SEARCH WIDGET */ | |
.nav-primary .search-form input[type="submit"] { | |
background-color: orange; | |
border: none; | |
box-shadow: none; | |
color: #fff; | |
cursor: pointer; | |
padding: 16px 24px; | |
padding: 1.6rem 2.4rem; | |
text-transform: uppercase; |
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
// Move Entry Header to a Full-width Hook only on Posts/Pages | |
add_action( 'genesis_after_header', 'leaguewp_full_width_hook', 9 ); | |
function leaguewp_full_width_hook() { | |
if ( is_singular('post' ) || is_singular('page' ) ) { | |
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 ); | |
remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); | |
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 ); |
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
/* Add Background Images Via the Customizer */ | |
add_action( 'customize_register', 'genesischild_customizer_register' ); | |
function genesischild_customizer_register() { | |
/* Customize Background Image Control Class */ | |
class Child_Genesischild_Image_Control extends WP_Customize_Image_Control { | |
/* Constructor. If $args['settings'] is not defined, use the $id as the setting ID */ |
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
add_action( 'wp_enqueue_scripts', 'genesischild_css' ); | |
function genesischild_css() { | |
wp_enqueue_style( 'genesischild', get_stylesheet_directory_uri() . '/style.css' ); | |
$handle = defined( 'CHILD_THEME_NAME' ) && CHILD_THEME_NAME ? sanitize_title_with_dashes( CHILD_THEME_NAME ) : 'child-theme'; | |
$opts = apply_filters( 'genesischild_images', array( '1', '2', '3', '4' ) ); | |
$settings = array(); | |
foreach( $opts as $opt ){ |
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
//* Register Widgets for Front Page | |
add_action( 'widgets_init', 'genesischild_front_page_widgets' ); | |
function genesischild_front_page_widgets() { | |
genesis_register_sidebar( array( | |
'id' => 'featured-background-1', | |
'name' => __( 'Front Page One', 'genesischild' ), | |
'description' => __( 'This is the Front Page One area', 'genesischild' ), | |
) ); | |
genesis_register_sidebar( array( |
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
h1, h2, h3, h4, h5, h6 { | |
font-family: 'Libre Franklin', sans-serif; | |
} | |
.entry-content { | |
font-family: 'alegreya',sans-serif; | |
font-size: 22px; | |
font-size: 2.2rem; | |
color: #444; | |
} |
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 | |
// Displays header. | |
get_header(); | |
// Displays Footer. | |
get_footer(); |