Skip to content

Instantly share code, notes, and snippets.

@neilgee
neilgee / _s_custom.header.php
Last active May 13, 2016 10:10
Custom Headers
<?php //<~ don't add me
<?php if ( get_header_image() ) : ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<img src="<?php header_image(); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="">
</a>
<?php endif; // End header image check. ?>
@thierrypigot
thierrypigot / backToTop.css
Created August 21, 2015 10:01
Add back to top in Genesis
/* ## Back to top
--------------------------------------------- */
.eemi-top:hover {
color: #fff !important;
background-color: rgba(0,0,0,0.8);
text-decoration: none;
}
.eemi-top {
display: none;
<?php
// Nav Menu Dropdown Class
include_once( CHILD_DIR . '/lib/classes/nav-menu-dropdown.php' );
/**
* Mobile Menu
*
*/
function be_mobile_menu() {
@BronsonQuick
BronsonQuick / gravity_forms_validation.php
Created April 12, 2012 09:51
Change the default validation message and add validation on default values in Gravity Forms
<?php
//This is a filter to change the default validation message that Gravity Forms generates
add_filter('gform_validation_message', 'change_validation_message', 10, 2);
function change_validation_message($message, $form)
{
return "<div class='validation_error'><strong>Oops!</strong> Looks like there’s something wrong. Please review the form above.</div>";
}
// Often forms in Gravity Forms to need to start with default values and we need to check the form in case the user hasn't entered new data and give them a validation message back