A Pen by Lauren Pittenger on CodePen.
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
<?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 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 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 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 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 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 |
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_action( 'wp_enqueue_scripts', 'enqueue_google_fonts' ); | |
function enqueue_google_fonts() { | |
// Get the theme data, so we can handle stylesheet versioning in one place | |
$theme = wp_get_theme(); | |
// Enqueue the Google fonts | |
$font_url = add_query_arg( 'family', urlencode( 'Cabin:400,700' ), '//fonts.googleapis.com/css' ); | |
wp_enqueue_style( 'google_font_cabin', $font_url, array(), $theme->Version ); | |
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
define( 'SCOPER_MONITOR_ROLES', 'editor' ); |