Skip to content

Instantly share code, notes, and snippets.

@johndcoy-zz
johndcoy-zz / gist:0777cf6e6ca23dece2198db073b9c20f
Created April 10, 2018 19:29
Disable WooCommerce Product Zoom Lightbox and slider
function wcc_remove_new_woo_gallery_support() {
remove_theme_support( 'wc-product-gallery-zoom' );
remove_theme_support( 'wc-product-gallery-lightbox' );
remove_theme_support( 'wc-product-gallery-slider' );
}
add_action( 'after_setup_theme', 'wcc_remove_new_woo_gallery_support', 11 );
@johndcoy-zz
johndcoy-zz / Hide Storefront Page Content
Created February 7, 2018 15:19
Hide Storefront Page Content for Parallax Hero to flush with header
.page-template-template-homepage .type-page {
display: none !important;
}
.page-template-template-homepage:not(.has-post-thumbnail) .site-main {
padding-top: 0 !important;
}
@johndcoy-zz
johndcoy-zz / gist:d3f4aec69f724bb1e052a1b9eac86421
Last active December 6, 2017 15:42
Remove Storefront Featured Image from Posts or Pages
/* Removes Featured Image from Posts */
img.attachment-.size-.wp-post-image {
display: none;
}
/* Removes Featured Image from Pages */
.page header.entry-header {
display: none;
}
@johndcoy-zz
johndcoy-zz / gist:30c85c5de9b057fe5207a736ad4eb4d0
Created March 21, 2017 16:34
Enable debug mode w/ info stored in log file.
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
// Disable display of errors and warnings     
define( 'WP_DEBUG_DISPLAY', false );
@johndcoy-zz
johndcoy-zz / page_content.php
Created April 27, 2013 22:17
This will pull content of a specific page based on its page id. Replace PAGEID with the page id given by WordPress.
<?php
$my_id = PAGEID;
$post_id_PAGEID = get_post($my_id);
$content = $post_id_PAGEID->post_content;
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
echo $content;
?>