Skip to content

Instantly share code, notes, and snippets.

@joshuadavidnelson
joshuadavidnelson / add-upload-attachments.php
Last active November 6, 2020 16:58
User Dropdown List and Custom Notification Routing in Gravity Forms. See the walkthrough:
<?php
/**
* Add the file uploads to the emails
*
* @author Joshua David Nelson, josh@joshuadnelson.com
*
* @link http://www.gravityhelp.com/documentation/page/Gform_user_notification_attachments
* @link http://www.gravityhelp.com/documentation/page/Gform_notification
**/
@dannyconnolly
dannyconnolly / translate_woocommerce.php
Created December 18, 2015 13:22
Change SKU text label in woocommerce to Product Code
function translate_woocommerce($translation, $text, $domain) {
if ($domain == 'woocommerce') {
switch ($text) {
case 'SKU':
$translation = 'Product Code';
break;
case 'SKU:':
$translation = 'Product Code:';
break;
@mikaelz
mikaelz / remove-all-product-categories-tags.php
Created January 27, 2016 11:37
Remove all WooCommerce product categories and tags
<?php
require dirname(__FILE__).'/wp-blog-header.php';
$wpdb->query("DELETE a,c FROM wp_terms AS a
LEFT JOIN wp_term_taxonomy AS c ON a.term_id = c.term_id
LEFT JOIN wp_term_relationships AS b ON b.term_taxonomy_id = c.term_taxonomy_id
WHERE c.taxonomy = 'product_tag'");
$wpdb->query("DELETE a,c FROM wp_terms AS a
LEFT JOIN wp_term_taxonomy AS c ON a.term_id = c.term_id
@lots0logs
lots0logs / child-theme-style-css.css
Created May 4, 2016 05:08
WordPress :: Divi Theme :: Display Author Bio On Posts
.author-shortcodes {
margin-top: 25px;
}
@rniswonger
rniswonger / wp-disable-plugin-update.php
Last active January 3, 2024 15:21
WordPress - Disable specific plugin update check
/**
* Prevent update notification for plugin
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Place in theme functions.php or at bottom of wp-config.php
*/
function disable_plugin_updates( $value ) {
if ( isset($value) && is_object($value) ) {
if ( isset( $value->response['plugin-folder/plugin.php'] ) ) {
unset( $value->response['plugin-folder/plugin.php'] );
}
@JHethDev
JHethDev / Divi-slide-menu-helper.html
Last active August 6, 2019 19:56 — forked from lots0logs/epanel-integration-body.html
WordPress :: Divi Theme :: Slide-Out Navigation :: Close menu when any link is clicked or main content area is clicked while slide menu is open
<script>
var closeDelay = 100;
(function($) {
$(window).load(function() {
setTimeout(function() {
$('#main-content, .et_pb_fullscreen_nav_container a').each(function() {
$(this).click(function() {
setTimeout(function() {
if ($('.et_pb_slide_menu_opened').is(':visible')) {
@wy4tt34rp
wy4tt34rp / WooCommerce Filter Adding Captions to Gallery Thumbnails
Last active October 26, 2021 14:43
WooCommerce Filter Adding Captions to Gallery Thumbnails
@amboutwe
amboutwe / yoast_seo_roles_remove.php
Last active December 13, 2023 10:11
Yoast SEO user roles
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Remove Yoast SEO user roles
* Credit: Yoast Team
* Last Tested: Oct 25 2017 using Yoast SEO 5.7.1 on WordPress 4.8.2
*/
// Remove Yoast `SEO Manager` role
if ( get_role('wpseo_manager') ) {
remove_role( 'wpseo_manager' );
@hbaker
hbaker / change-divi-mobile-menu-breakpoint.css
Created January 25, 2018 02:01
Divi Theme - Modify Mobile Menu Breakpoint
/* CHANGE MOBILE NAV BREAKPOINT */
@media only screen and ( max-width: 1079px ) { /* Change this number to modify breakpoint width */
#top-menu-nav, #top-menu {display: none;}
#et_top_search {display: none;}
#et_mobile_nav_menu {display: block;}
}
@wy4tt34rp
wy4tt34rp / wp-disable-plugin-update.php
Created February 24, 2022 13:23 — forked from rniswonger/wp-disable-plugin-update.php
WordPress - Disable specific plugin update check
/**
* Prevent update notification for plugin
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Place in theme functions.php or at bottom of wp-config.php
*/
function disable_plugin_updates( $value ) {
if ( isset($value) && is_object($value) ) {
if ( isset( $value->response['plugin-folder/plugin.php'] ) ) {
unset( $value->response['plugin-folder/plugin.php'] );
}