Skip to content

Instantly share code, notes, and snippets.

@jodzeee
jodzeee / gist:959bbcbf3617aa6df18975eed23eb4c9
Created March 7, 2025 20:27
Gravity Forms: Move Progress Bar to Bottom
jQuery(document).ready(function() {
function movin_the_bar_like_a_boss() {
jQuery('div.gf_progressbar_wrapper').each(function(i,e){
fielddesc = jQuery('<div>').append(jQuery(e).clone()).remove().html();
jQuery(e).siblings('div.gform_body').after(fielddesc);
jQuery(e).remove();
});
}
@jodzeee
jodzeee / gist:d63ba9bc2ec3e426ca4e75c03ea737d1
Created March 7, 2025 20:26
Gravity Forms - Remove Required Text
<?php
add_filter( 'gform_required_legend', '__return_empty_string' );
@jodzeee
jodzeee / gist:624d7641156d1a332b1296e020c9cd10
Created March 7, 2025 20:22
Send child entries to Salesforce
<?php
// Change 36 to your parent form ID
add_action( 'gform_after_submission_36', function( $entry, $form ){
global $vxg_salesforce;
$parent_entry = new GPNF_Entry( $entry );
$child_entries = $parent_entry->get_child_entries( 25 ); // Change 25 to the Nested Form field ID in the parent (FIELD ID, NOT FORM ID)
@jodzeee
jodzeee / gist:dd5e65759ae0d386d369c95de4d69d5b
Created January 6, 2025 21:09
Gravity Forms - send to spam if URLs or email in text field
<?php
add_filter( 'gform_entry_is_spam', 'filter_gform_entry_is_spam_urls_and_emails', 11, 3 );
function filter_gform_entry_is_spam_urls_and_emails( $is_spam, $form, $entry ) {
if ( $is_spam ) {
return $is_spam;
}
$field_types_to_check = array(
'hidden',
@jodzeee
jodzeee / gist:ab06b148100727852115850c77d81815
Created July 8, 2024 21:24
Remove the plugin notifications from all the pages except the main WP Admin dashboard
<?php
add_action( 'current_screen', function() {
$screen = get_current_screen();
if ( $screen->id !== "dashboard" ) {
add_action( 'admin_enqueue_scripts', function() {
echo '<style>
@jodzeee
jodzeee / gist:01ffb69417751f4c02bb1818409684d9
Last active April 29, 2024 14:43
Add frequently used links to main menu of Admin Bar
/** Add frequently used links to main menu of Admin Bar */
if ( ! function_exists( 'x_add_options_item_to_admin_bar' ) ) {
function x_add_options_item_to_admin_bar() {
global $wp_admin_bar;
$wp_admin_bar->add_menu(
array(
'parent' => 'site-name',
'id' => 'x_library',
'title' => __( 'Media Library', 'x' ),
@jodzeee
jodzeee / gist:3e1c6b975d28827435adc81e1c029cae
Created January 19, 2021 07:57
Beaver Builder HTML Module outputs custom fields for JMWH single listing
<p class="listing-details listing-content">[wpbb post:content]</p>
<div class="listing-details listing-community relationship-field-list"><span class="detail-label">Community:</span> [wpbb post:acf_relational type='post_object' name='community_relationship']</div>
<p class="listing-details listing-status">[wpbb post:terms_list taxonomy='status_tax' html_list='no' separator=', ' linked='no']</p>
<p class="listing-details listing-address">[wpbb post:acf type='text' name='property_location_address']<br />
[wpbb post:acf type='text' name='property_location_city'],
[wpbb post:acf type='text' name='property_location_state']
[wpbb post:acf type='text' name='property_location_zip']</p>
<p class="listing-details listing-price">[wpbb post:acf type='text' name='property_location_price']</p>
<p class="listing-details listing-size"><span class="detail-label">Square Feet:</span> [wpbb post:acf type='text' name='property_details_square_feet']</p>
<p class="listing-details listing-bedrooms"><span class="detail-label">Bedroo
@jodzeee
jodzeee / csscomb-prefs.txt
Last active October 12, 2016 22:03
CSSComb preferences
{
"config": {
"exclude": [
".git/**",
"node_modules/**"
],
"verbose": true,
"always-semicolon": true,
"block-indent": "\t",
@jodzeee
jodzeee / gfpc-cpt.php
Last active April 23, 2016 04:37
Add CPT (product) functionality to Genesis Featured Post Combo
add_filter( 'gfpc_query_args_gfpc-widget-13', 'gd_filter_home_blog_posts', 20, 2 );
function gd_filter_home_blog_posts( $args, $instance ) {
$args['post_type'] = array( 'page', 'product');
return $args;
}
@jodzeee
jodzeee / 0_reuse_code.js
Created September 24, 2015 17:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console