Skip to content

Instantly share code, notes, and snippets.

Damien Carbery damiencarbery

Block or report user

Report or block damiencarbery

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@damiencarbery
damiencarbery / move-title-off-hero-essence-pro.php
Created Apr 29, 2019
Move title off hero image in Essence Pro: Move title off the hero image and back into the content area in Essence Pro theme https://www.damiencarbery.com/2019/04/move-title-off-hero-image-in-essence-pro/
View move-title-off-hero-essence-pro.php
<?php
/*
Plugin Name: Move title off hero image in Essence Pro
Plugin URI: https://www.damiencarbery.com/2019/04/move-title-off-hero-image-in-essence-pro/
Description: Move title off the hero image and back into the content area in Essence Pro theme.
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
Version: 0.1
*/
View slug-to-body-class.php
<?php
/*
Plugin Name: Slug to Body Class
Version: 0.1
Plugin URI: http://www.wpbeginner.com/wp-themes/how-to-add-page-slug-in-body-class-of-your-wordpress-themes/
Description: Add Page/Post Slug to Body Class
Author: Syed Balkhi
Author URI: https://plus.google.com/101623299936375408403/
*/
View essence-pro-titles-to-content.php
<?php
// Disable putting the page title on top of the hero image but retain the hero image creation.
add_action( 'genesis_meta', 'lmtt_essence_page_hero_header', 5 );
function lmtt_essence_page_hero_header() {
remove_action( 'genesis_meta', 'essence_page_hero_header' );
// Hero area setup.
add_action( 'genesis_before_header', 'essence_header_hero_start' );
add_action( 'genesis_after_header', 'essence_header_title_wrap', 90 );
add_action( 'genesis_after_header', 'essence_header_title_end_wrap', 98 );
@damiencarbery
damiencarbery / wc-remove-zero-decimals.php
Created Apr 14, 2019
Remove Zero Decimals from WooCommerce: Remove decimal portion of WooCommerce price if it is zero. https://www.damiencarbery.com/2019/04/remove-zero-decimals-from-wooCommerce/
View wc-remove-zero-decimals.php
<?php
/*
Plugin Name: Remove Zero Decimals from WooCommerce
Plugin URI: Plugin URI: https://www.damiencarbery.com/
Description: Remove decimal portion of WooCommerce price if it is zero.
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
Version: 0.1
*/
@damiencarbery
damiencarbery / wc-remove-zero-decimals.php
Created Apr 12, 2019
Remove Zero Decimals from WooCommerce: Remove decimal portion of WooCommerce price if it is zero.
View wc-remove-zero-decimals.php
<?php
/*
Plugin Name: Remove Zero Decimals from WooCommerce
Plugin URI: Plugin URI: https://www.damiencarbery.com/
Description: Remove decimal portion of WooCommerce price if it is zero.
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
Version: 0.1
*/
@damiencarbery
damiencarbery / menu-hover-effects.php
Last active Apr 9, 2019
Menu Hover Effects - Almost drop-in menu effects from codrops. https://www.damiencarbery.com/2019/04/menu-hover-effects/
View menu-hover-effects.php
<?php
/*
Plugin Name: Menu Hover Effects
Plugin URI: https://www.damiencarbery.com/2019/04/menu-hover-effects/
Description: Add hover effects to menus.
Author: Damien Carbery
Version: 0.1
*/
View essence-pro-extra-widget-areas.php
<?php
/*
Plugin Name: Extra Widget Areas (Essence Pro)
Plugin URI: https://damiencarbery.com/
Description: Add some extra widget areas to Essence Pro's front page.
Author: Damien Carbery
Version: 0.1
*/
@damiencarbery
damiencarbery / amforanpr-cmb2.php
Created Mar 30, 2019
CMB2 Options page to generate a list of services - Another example of using CMB2 repeater fields to replace ACF Pro repeater feature. https://www.damiencarbery.com/2019/04/cmb2-options-page-to-generate-a-list-of-services/
View amforanpr-cmb2.php
<?php
/*
Plugin Name: AMForanPR PR Services with CMB2
Plugin URI: http://www.damiencarbery.com
Description: Use CMB2 for the PR Services page.
Author: Damien Carbery
Version: 0.1
*/
add_action( 'cmb2_admin_init', 'dcwd_pr_services_options' );
View wcal_data_tracking_message.diff
--- includes/wcal_data_tracking_message.orig.php 2018-11-01 13:18:12.000000000 +0000
+++ includes/wcal_data_tracking_message.php 2019-03-26 12:01:14.853387900 +0000
@@ -24,6 +24,9 @@
// Shop Page notice
add_action( 'woocommerce_before_shop_loop', array( &$this, 'wcal_add_logged_msg' ), 10 );
//add_action( 'woocommerce_after_shop_loop_item', array( &$this, 'wcal_add_logged_msg' ), 10 );
+
+ // Checkout page required field filter
+ add_action( 'woocommerce_checkout_required_field_notice', array( &$this, 'wcal_remove_gdpr_msg' ), 10, 2 );
}
@damiencarbery
damiencarbery / disable-plugins-by-url.php
Last active Mar 25, 2019
Class To Disable WordPress Plugins By URL - Disable specified plugins except for certain pages - enhanced with caching. http://www.damiencarbery.com/2019/03/class-to-disable-wordpress-plugins-by-url/
View disable-plugins-by-url.php
<?php
/*
Plugin Name: Class To Disable WordPress Plugins By URL
Plugin URI: http://www.damiencarbery.com/2019/03/class-to-disable-wordpress-plugins-by-url/
Description: Disable specified plugins except for certain pages - enhanced with caching.
Version: 0.1
Author: Damien Carbery
Author URI: http://www.damiencarbery.com/
*/
You can’t perform that action at this time.