Skip to content

Instantly share code, notes, and snippets.

@hendratok
hendratok / gravity_forms_validation.php
Created July 13, 2021 07:23 — forked from BronsonQuick/gravity_forms_validation.php
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
@hendratok
hendratok / slicknav.php
Created December 6, 2016 15:54 — forked from neilgee/slicknav.php
Using SlickNav on WordPress and Genesis Mobile Menus
<?php
//do not copy above opening php tag
/**
* Using SlickNav as Mobile Menus
*
* @package Slick Nav Mobile Menu
* @author Neil Gee
* @link https://wpbeaches.com/using-slick-responsive-menus-genesis-child-theme/
* @copyright (c) 2014, Neil Gee
@hendratok
hendratok / enqueue-register.php
Created December 6, 2016 04:02 — forked from danielpataki/enqueue-register.php
WordPress Enqueues
function my_assets() {
wp_register_script( 'owl-carousel', get_stylesheet_directory_uri() . '/owl.carousel.js', array( 'jquery' ) );
wp_enqueue_script( 'owl-carousel' );
}
add_action( 'wp_enqueue_scripts', 'my_assets' );
<?php
// Nav Menu Dropdown Class
include_once( CHILD_DIR . '/lib/classes/nav-menu-dropdown.php' );
/**
* Mobile Menu
*
*/
function be_mobile_menu() {
@hendratok
hendratok / hello-bar-single.php
Created November 5, 2016 09:30 — forked from neilgee/hello-bar-single.php
Genesis HelloBar Preheader Full Width
<?
//Don't paste in the above php tag
// Enqueue scripts and styles
add_action( 'wp_enqueue_scripts', 'hello_bar_scripts_styles' );
function hello_bar_scripts_styles() {
wp_enqueue_script( 'hello-bar', esc_url( get_stylesheet_directory_uri() ) . '/js/hello-bar.js', array( 'jquery' ), '1.0.0' );
}
@hendratok
hendratok / backToTop.css
Last active October 24, 2016 15:38 — forked from thierrypigot/backToTop.css
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;
@hendratok
hendratok / datepicker-today-default-value.html
Created August 26, 2016 06:04 — forked from noahub/datepicker-today-default-value.html
Create a datepicker field in Unbounce and set its default value to today's date.
<script src="//a.unbounce.com/s/javascripts/jquery/jquery-ui.1.8.16.min.js"></script>
<script>
$(document).ready(function() {
var currentDate = new Date();
$( "#your_date_field" ).datepicker();
$( "#your_date_field" ).datepicker("setDate", currentDate);
});
</script>
<?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. ?>
@hendratok
hendratok / dabblet.css
Created June 11, 2013 02:28
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body{font-family:arial;}
min-height: 100%;