Skip to content

Instantly share code, notes, and snippets.

@gerdneuman
gerdneuman / child-theme.php
Last active October 10, 2018 18:22
child theme stuff
/* 2015-04-19: Also do not print gallery on /shop/ - because does not work with long list
* see http://www.kadencethemes.com/support-forums/topic/remove-gallery-shortcode-from-product-short-description/#post-38868 */
function remove_shortcode_from_shop( $content ){
if ( is_shop() ) {
$content = strip_shortcodes(wpautop(wptexturize( $content )));
}
return $content;
}
add_filter( 'archive_woocommerce_short_description', 'remove_shortcode_from_shop', 9 );
remove_filter( 'archive_woocommerce_short_description', 'do_shortcode', 11 );
@gerdneuman
gerdneuman / spinner.svg
Last active June 26, 2017 12:19
spinner.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gerdneuman
gerdneuman / virtue_youtube_responsive.md
Created May 12, 2017 11:54
virtue youtube responsive

Emded code is:

[space size="15px"]

<div class="video-fit">
<iframe width="640" height="360" src="https://www.youtube-nocookie.com/embed/lzcBnIwBQdU?rel=0&hl=en&cc_lang_pref=en&cc_load_policy=1" frameborder="0" allowfullscreen></iframe>
</div>

[space size="25px"]
// Make empty individual links in Mobile Menu collapse/expand
// Empty a links do not toggle the collapse/expand, so trigger it manually
$('.kad-mobile-nav')
.find('.sf-dropdown')
.find('a:not([href]), a[href="#"]')
.click(function (event) {
event.preventDefault();
var $a = $(this);
var $toggle = $a.nextAll('.collapse-next');
$toggle.click();
@gerdneuman
gerdneuman / class-wc-admin-duplicate-order.php
Last active June 20, 2022 11:53
Duplicate Order functionality for WooCommerce
<?php
/**
* Duplicate order functionality
*
* @author WooThemes
* @category Admin
* @package WooCommerce/Admin
* @version 2.7.0
*/