A Pen by Lauren Pittenger on CodePen.
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 | |
/** | |
* The Events Calendar - Bypass Genesis genesis_do_post_content in Event Views | |
* | |
* This snippet overrides the Genesis Content Archive settings for Event Views | |
* | |
* Event Template set to: Admin > Events > Settings > Display Tab > Events template > Default Page Template | |
* | |
* The Events Calendar @4.0.4 |
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
function custom_widget_featured_image() { | |
global $post; | |
echo tribe_event_featured_image( $post->ID, 'thumbnail' ); | |
} | |
add_action( 'tribe_events_list_widget_before_the_event_title', 'custom_widget_featured_image' ); |
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 if ( date_i18n( 'Y-m-01' ) !== tribe_get_month_view_date() ) : ?> | |
<li class="tribe-events-nav-current"> | |
<a href="<?php echo Tribe__Events__Main::instance()->getLink( 'month' ) ?>">Back to Current Month</a> | |
</li> | |
<?php endif ?> |
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
// We want to adapt the names of views listed within the Tribe Events Bar | |
add_filter( 'tribe-events-bar-views', 'rename_tribe_views_in_selector', 100 ); | |
function rename_tribe_views_in_selector( $views ) { | |
// This lists the original view names you wish to change along | |
// with the substitutes to wish to use in their place | |
$to_change = array( | |
'List' => 'All Events', | |
'Month' => 'Calendar', | |
'Photo' => 'Picture Board', |
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
// favicon for admin dashboard | |
function admin_favicon() { | |
echo '<link rel="Shortcut Icon" type="image/x-icon" href="' . get_bloginfo( 'stylesheet_directory' ) . '/images/favicon-admin.ico" />'; | |
} | |
add_action( 'admin_head', 'admin_favicon' ); |
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
//* Customize the entire footer | |
remove_action( 'genesis_footer', 'genesis_do_footer' ); | |
add_action( 'genesis_footer', 'highspire_custom_footer' ); | |
function highspire_custom_footer() { | |
?> | |
<p>© Copyright 2012 - <?php echo date('Y'); ?> <a href="<?php echo get_bloginfo('url'); ?>"><?php echo get_bloginfo('name'); ?></a>, all rights reserved. Site by me, of course.</p> | |
<?php | |
} |
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
&:nth-child(3n+4) { | |
// do it only to every third item starting with #4. | |
} |
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 | |
// Object Oriented PHP Basics | |
try { | |
// this is where the code we want to test goes | |
} catch (Exception $e) { | |
// Inspect $e | |
$e->getMessage(); // gets message that was passed into the exception constructor when the exception was thrown |