Skip to content

Instantly share code, notes, and snippets.

<?php
//* Do NOT include the opening php tag
genesis_register_sidebar( array(
'id' => 'welcome',
'name' => __( 'Welcome', 'minimum' ),
'description' => __( 'This is the Welcome section of the homepage.', 'minimum' ),
) );
genesis_register_sidebar( array(
'id' => 'home-bottom-message',
<?php
//* Do NOT include the opening php tag
/* Display widget content for "welcome" section.
------------------------------------------------- */
function minimum_home_loop_helper_top() {
genesis_widget_area( 'welcome', array(
<?php
//* Do NOT include the opening php tag
//* Add Home Widget areas
add_action( 'genesis_after_header', 'minimum_home_loop_helper_top', 15 );
add_action( 'genesis_after_header', 'minimum_home_featured', 15 );
add_action( 'genesis_after_header', 'minimum_home_loop_helper_bottom', 15 );
/* Welcome
--------------------------------------------- */
.welcome {
background: #fff;
clear: both;
}
.welcome .wrap {
color: #333;
@chrisegg
chrisegg / Gravity_Forms_Field_Label_Visibility.php
Last active June 24, 2016 18:50
Gravity Forms Field Label Visibility
<?php
//* Do NOT include the opening php tag
add_filter( 'gform_enable_field_label_visibility_settings', '__return_true' );
@chrisegg
chrisegg / radio-button-submit
Last active December 25, 2020 02:16
This snippet will allow you to use a radio button field to submit the form without using the submit button.
<script>
 jQuery(document).ready(function($) {
 $('input[type=radio]').on('change', function() {
 $(this).closest("form").submit();
 });
});
</script>
@chrisegg
chrisegg / gforms_remove_button
Last active January 26, 2021 16:18
Replace the ID with your form ID number. Place this code in you functions.php file or a custom functions plugin
// Replace ID with your forms ID number.
add_filter( 'gform_submit_button_ID', '__return_false' );
<?php
// Do NOT include the opening php tag
// Replace 1 with your forms ID
// Replace User Notification with the name of your notification
// Insert your file path
add_filter( 'gform_notification_1', 'add_notification_attachments', 10, 3 );
function add_notification_attachments( $notification, $form, $entry ) {
if ( $notification['name'] == 'User Notification' ) {
$path = 'path/to/file.pdf';
// Replace ID with your forms ID number.
body #gform_wrapper_ID .gform_footer input[type=submit] {
visibility: hidden;
}
@chrisegg
chrisegg / gravity_forms_readonly.js
Last active August 18, 2021 14:58
This code snippet works for text input fields only and can be placed in an HTML field within your form.
<script type="text/javascript">
jQuery(document).ready(function(){
/* apply only to a input with a class of gf_readonly */
jQuery(".gf_readonly input").attr("readonly","readonly");
});
</script>