Skip to content

Instantly share code, notes, and snippets.

@rynaldos-zz
rynaldos-zz / wc-hide-cats-archive-page.php
Last active March 7, 2021 00:10
[WooCommerce] Remove categories from shop and other pages
add_filter( 'get_terms', 'get_subcategory_terms', 10, 3 );
function get_subcategory_terms( $terms, $taxonomies, $args ) {
$new_terms = array();
// if a product category and on the shop page
// to hide from shop page, replace is_page('YOUR_PAGE_SLUG') with is_shop()
if ( in_array( 'product_cat', $taxonomies ) && ! is_admin() && is_page('YOUR_PAGE_SLUG') ) {
foreach ( $terms as $key => $term ) {
if ( ! in_array( $term->slug, array( 'woo' ) ) ) {
$new_terms[] = $term;
@jhochwald
jhochwald / Office2016_TelemetrySettings.ps1
Created November 26, 2016 14:26
Disable Office Telemetry Agent and other data collection and Block Macros in files downloaded from the Internet.
#requires -Version 1.0
<#
.SYNOPSIS
Disable Office Telemetry Agent and other data collection
.DESCRIPTION
Disable Office Telemetry Agent and other data collection and Block Macros in files downloaded from the Internet.
Makes Office less spying on us...