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
// Remove sidebar and add new body class to front page. | |
add_action ( 'get_header', 'pasada_full_width'); | |
function pasada_full_width() { | |
if ( is_front_page() ) { | |
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); | |
add_filter ( 'body_class', 'pasada_test' ); | |
} | |
} | |
// Add body class. |
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
/** | |
* Redirect WordPress register page to WooCommerce my-account page. | |
* | |
*/ | |
function pasada_wp_register_redirect() { | |
wp_redirect( home_url( '/my-account/' ) ); | |
exit(); | |
} |
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
/** | |
* Remove WooCommerce breadcrumbs. | |
* | |
*/ | |
function pasada_remove_wc_breadcrumbs() { | |
remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); | |
} | |
add_action( 'get_header', 'pasada_remove_wc_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
/** | |
* Order The Events Calendar events by post date (instead of event date) in the main blog loop. | |
* | |
*/ | |
function tribe_post_date_ordering( $query ) { | |
if ( $query->tribe_is_multi_posttype) { | |
remove_filter( 'posts_fields', array( 'TribeEventsQuery', 'multi_type_posts_fields' ) ); | |
$query->set( 'order', 'DESC' ); |
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
/** | |
* Disable sidebar on WooCommerce login page. | |
* | |
*/ | |
function pasada_wc_login_page_remove_sidebar() { | |
if ( is_account_page() && !is_user_logged_in() ) { | |
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); | |
add_filter( 'body_class', 'pasada_full_width_page_body_class' ); |
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
/** | |
* Replace default logo on WordPress login page with custom logo at /themename/images/logo-login.png. | |
* | |
*/ | |
function pasada_login_logo() { ?> | |
<style type="text/css"> | |
body.login div#login h1 a { | |
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/logo-login.png); | |
} |
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 custom body class on development site (use to display "beta" banner image in header, for example). | |
* | |
*/ | |
function pasada_dev_body_class( $classes ) { | |
$server_ip = $_SERVER['SERVER_ADDR']; | |
if ( $server_ip === '127.0.0.1' ) { |
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
/** | |
* Change placeholder text in search box input field. | |
* | |
*/ | |
function pasada_search_text( $text ) { | |
return esc_attr( 'Search this site' ); | |
} | |
add_filter( 'genesis_search_text', 'pasada_search_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
/** | |
* Change the "read more" link text on post excerpts to output this: … more » | |
* | |
*/ | |
function custom_read_more_link() { | |
return '… <a class="more-link" href="' . get_permalink() . '" rel="nofollow">more »</a>'; | |
} | |
add_filter( 'excerpt_more', 'custom_read_more_link' ); |
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
/** | |
* Modify the post excerpt length (default is 55 words). | |
* | |
*/ | |
function reduce_excerpt_length() { | |
return 30; | |
} | |
add_filter( 'excerpt_length', 'reduce_excerpt_length', 100 ); |
OlderNewer