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( 'pre_get_posts', 'leaven_search_hide_landing_page' ); | |
/** | |
* Remove landing pages from the search results. | |
* | |
* @param $query \WP_Query | |
* | |
* @return mixed | |
*/ |
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( 'wp_loaded', 'leaven_maybe_add_product_lightbox' ); | |
/** | |
* Use the Woo lightbox if WP Featherlight isn't active. | |
*/ | |
function leaven_maybe_add_product_lightbox() { | |
if ( function_exists( 'wp_featherlight' ) ) { | |
remove_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 ); | |
add_action( 'woocommerce_product_thumbnails', 'leaven_do_woocommerce_thumbnails', 20 ); |
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 | |
// Do not include the opening tag. | |
add_filter( 'supersideme_menu_output', 'prefix_add_woo_account_menu_supersideme' ); | |
/** | |
* Mimic the WooCommerce account menu and add it to the SuperSide Me menu panel. | |
* | |
* @param $output_menu | |
* |
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 | |
// Do not include the opening tag. | |
/** | |
* Get the term meta (generally headline or intro text). Backwards compatible, | |
* but uses new term meta (as of Genesis 2.2.7) | |
* @param $term object the term | |
* @param $key string meta key to retrieve | |
* @param string $value string output of the term meta |
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 | |
// do not include the opening tag | |
add_filter( 'genesis_noposts_text', 'leaven_change_search_text_one', 10, 2 ); | |
function leaven_change_search_text_one( $text ) { | |
$text .= __( ' Would you like to try again?', 'leaven' ); | |
$text .= get_search_form( false ); | |
return $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
<?php | |
// Do not include the opening tag! | |
add_filter( 'genesis_options', 'leaven_downloads_archive_options' ); | |
/** | |
* Change number of posts, as well as size and image alignment of featured image | |
* on EDD custom post type | |
*/ | |
function leaven_downloads_archive_options( $args ) { |
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 | |
//do not include the opening tag! | |
// Required Scripts and Styles | |
add_action( 'wp_enqueue_scripts', 'leaven_load_scripts', 15 ); | |
function leaven_load_scripts() { | |
// Responsive Navigation | |
wp_enqueue_style( 'fontawesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css', array(), '4.3.0' ); |
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 | |
// do NOT include the opening tag | |
add_filter( 'simple_social_default_glyphs', 'rgc_simple_social_icons_glyphs' ); | |
function rgc_simple_social_icons_glyphs( $glyphs ) { | |
$glyphs = array( | |
'bloglovin' => '<span class="fa fa-heart"></span><span class="screen-reader-text">Bloglovin</span>', | |
'dribbble' => '<span class="fa fa-dribbble"></span><span class="screen-reader-text">Dribbble</span>', | |
'email' => '<span class="fa fa-envelope"></span><span class="screen-reader-text">Email</span>', |
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 | |
// do not include the opening tag! | |
add_action( 'genesis_entry_content', 'rgc_add_term_image_archives' ); | |
function rgc_add_term_image_archives() { | |
if ( ! is_home() && ! is_archive() ) { | |
return; | |
} |
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 | |
// do not include the opening php tag | |
// turn Photon off so we can get the correct image | |
$photon_removed = ''; | |
if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) { // check that we are, in fact, using Photon in the first place | |
$photon_removed = remove_filter( 'image_downsize', array( Jetpack_Photon::instance(), 'filter_image_downsize' ) ); | |
} |