Skip to content

Instantly share code, notes, and snippets.

@damiencarbery
damiencarbery / elementor-add-to-cart-sold-out.php
Last active September 16, 2023 15:52
Elementor Pro - Change Add to Cart button when sold out - Change Custom Add to Cart button to Sold Out text if product is sold out. https://www.damiencarbery.com/2023/09/change-elementor-pro-add-to-cart-when-sold-out/
<?php
/*
Plugin Name: Elementor Pro - Change Add to Cart button when sold out
Description: Change Custom Add to Cart button to Sold Out text if product is sold out.
Plugin URI: https://www.damiencarbery.com/2023/09/change-elementor-pro-add-to-cart-when-sold-out/
Version: 0.1
Author: Damien Carbery
*/
defined( 'ABSPATH' ) || exit;
@damiencarbery
damiencarbery / disable-generatepress-featured-image.php
Created July 7, 2023 14:25
GeneratePress - do not display featured image - Disable showing featured image in GeneratePress. Primarily for use when the featured image breaks the page layout. https://www.damiencarbery.com/2023/07/generatepress-do-not-display-featured-image/
@damiencarbery
damiencarbery / amelia-on-site-payments.php
Created June 20, 2023 17:37
Amelia: Allow on-site payments for admins - Allow site admin or Amelia Employees/Managers create appointments without making a payment.
<?php
/*
Plugin Name: Amelia: Allow on-site payments for admins
Plugin URI: https://www.damiencarbery.com/2023/06/amelia-allow-on-site-payments-for-admins/
Description: Allow site admin or Amelia Employees/Managers create appointments without making a payment.
Author: Damien Carbery
Version: 0.1
*/
@damiencarbery
damiencarbery / sitemap-exclude-post-type.php
Created March 29, 2023 09:25
Sitemap - exclude a custom post type
<?php
/*
Plugin Name: Sitemap - exclude a custom post type
Plugin URI: https://wpza.net/how-to-exclude-post-types-from-wp-sitemap-xml-in-wordpress/
Description: Exclude a specific custom post type from the WordPress sitemaps.
Version: 0.1
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
*/
@damiencarbery
damiencarbery / genesis-responsive-menu.php
Created March 15, 2023 11:34
For Parallax Pro theme: Add the genesis-responsive-menu class when generating page, to avoid flash of desktop menu on mobile.
<?php
/*
Plugin Name: Genesis Responsive Menu in source (Parallax Pro)
Plugin URI: https://www.damiencarbery.com
Description: For Parallax Pro: Add the genesis-responsive-menu class when generating page, to avoid flash of desktop menu on mobile.
Author: Damien Carbery
Version: 0.1
*/
@damiencarbery
damiencarbery / attach-product-docs-to-cf7-email.php
Last active December 19, 2022 13:05
Attach WooCommerce product docs to Contact Form 7 email - Create a brochure request form to send documents to a customer. https://www.damiencarbery.com/2022/12/attach-woocommerce-product-docs-to-contact-form-7-email/
<?php
/*
Plugin Name: Attach WooCommerce product docs to Contact Form 7 email
Plugin URI: https://www.damiencarbery.com/2022/12/attach-woocommerce-product-docs-to-contact-form-7-email/
Description: Create a brochure request form to send documents to a customer.
Author: Damien Carbery
Version: 0.1
WC tested up to: 7.2.0
*/
@damiencarbery
damiencarbery / genesis-breadcrumb-link-current-view.php
Created December 14, 2022 12:37
Make title a link in Genesis breadcrumbs
@damiencarbery
damiencarbery / acf-load-select-values.php
Created December 9, 2022 20:51
Populate ACF Select field with menu names - Use the acf/load_value filter to load values to a Select field. https://www.damiencarbery.com/2022/12/populate-acf-select-field-with-menu-names/
<?php
/*
Plugin Name: Populate ACF Select field with menu names
Plugin URI: https://www.damiencarbery.com/2022/12/populate-acf-select-field-with-menu-names/
Description: Use the acf/load_value filter to load values to a Select field.
Author: Damien Carbery
Version: 0.1
*/
@damiencarbery
damiencarbery / wc-show-shipping-class-ids.php
Created December 3, 2022 16:00
Show shipping class IDs in WooCommerce - List shipping classes and their IDs for use in custom code. https://www.damiencarbery.com/2022/12/show-shipping-class-ids-in-woocommerce/
<?php
/*
Plugin Name: Show shipping class IDs in WooCommerce
Plugin URI: https://www.damiencarbery.com/2022/12/show-shipping-class-ids-in-woocommerce/
Description: List shipping classes and their IDs for use in custom code.
Author: Damien Carbery
Version: 0.1
*/
@damiencarbery
damiencarbery / wc-convert-order-note-to-custom-field.php
Last active November 23, 2022 15:34
Convert WooCommerce order note to custom field - Parse order notes to extract a shipping tracking number, creating a custom field if found.
<?php
/*
Plugin Name: Convert WooCommerce order note to custom field
Plugin URI: https://www.damiencarbery.com/
Description: Parse order notes to extract a shipping tracking number, creating a custom field if found.
Author: Damien Carbery
Version: 0.2
*/