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
/** | |
* Redirect WordPress register page to WooCommerce my-account page. | |
* | |
*/ | |
function pasada_wp_register_redirect() { | |
wp_redirect( home_url( '/my-account/' ) ); | |
exit(); | |
} |
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
/** | |
* Remove and replace Google and iCal links on single event pages, with the link modified to open in new tab. | |
* | |
*/ | |
remove_action( 'tribe_events_single_event_after_the_content', array( 'TribeiCal', 'single_event_links' ) ); | |
add_action('tribe_events_single_event_after_the_content', 'tribe_add_cal_link'); | |
function tribe_add_cal_link() { |
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
/** | |
* Event featured image wrapped in a link to a larger version of the same image. | |
* | |
* Replaces tribe_event_featured_image to enable link to a larger version for display in a lightbox. | |
* Called in custom single event template file (/pasada/tribe-events/single-event.php). | |
* | |
*/ | |
function pasada_tribe_event_featured_image( $post_id = null, $size = 'full', $size2 = 'large', $link = true ) { | |
if ( is_null( $post_id ) ) { | |
$post_id = get_the_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
/** | |
* Remove allowed tags notice on comment form. | |
* | |
*/ | |
function pasada_remove_comment_form_allowed_tags( $defaults ) { | |
$defaults['comment_notes_after'] = ''; | |
return $defaults; | |
} |
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
/** | |
* Customize Genesis footer credits. | |
* | |
*/ | |
function pasada_footer_creds_text() { | |
echo '<div class="creds"><p>© Copyright ' . date('Y') . ' <a href="http://www.globalmindbody.org/" title="Global Mind Body" target="_blank">Global Mind Body</a> · <a href="/contact/" title="Contact us">Contact</a> · <a href="/privacy/" title="Privacy policy">Privacy</a> · <a href="/terms/" title="Terms of use">Terms</a></p></div>'; | |
} | |
add_filter( 'genesis_footer_creds_text', 'pasada_footer_creds_text' ); |
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
/** | |
* Modify display of post entries on Genesis blog and archive pages. | |
* | |
*/ | |
function pasada_modify_entries() { | |
if ( is_home() || is_author() || is_category() || is_tag() || is_search() ) { | |
// Remove unwanted post elements. | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 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
/** | |
* Modify the post excerpt length (default is 55 words). | |
* | |
*/ | |
function reduce_excerpt_length() { | |
return 30; | |
} | |
add_filter( 'excerpt_length', 'reduce_excerpt_length', 100 ); |
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
/** | |
* 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 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 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' ) { |
OlderNewer