Skip to content

Instantly share code, notes, and snippets.

View jlipinski3's full-sized avatar

Josh L jlipinski3

View GitHub Profile
@carcinocron
carcinocron / debugger pause beforeunload
Last active September 24, 2024 12:02
Chrome: pause before redirect
// Run this in the F12 javascript console in chrome
// if a redirect happens, the page will pause
// this helps because chrome's network tab's
// "preserve log" seems to technically preserve the log
// but you can't actually LOOK at it...
// also the "replay xhr" feature does not work after reload
// even if you "preserve log".
window.addEventListener("beforeunload", function() { debugger; }, false)
@stuartduff
stuartduff / storefront-display-all-homepage-categories
Last active May 2, 2021 01:20
Display All Product Categories on Storefront homepage
/**
* Alters the output of the homepage product categories on the Storefront theme
* Affects the storefront_product_categories_args filter in /inc/storefront-template-functions.php
*/
function sd_display_all_home_product_categories( $args ) {
// Sets the maximum product categories to 50, you can increase this to display more if need be.
$args['limit'] = 50;