Skip to content

Instantly share code, notes, and snippets.

@blakemiller99
blakemiller99 / custom-acf-json-paths.php
Last active August 12, 2023 12:33 — forked from lgladdy/custom-acf-json-paths.php
ACF 6.2 custom load and save paths for ACF JSON
<?php
add_filter( 'acf/json/load_paths', 'set_custom_json_load_paths' );
function set_custom_json_load_paths( $paths ) {
$paths[] = ABSBATH . '/wp-content/uploads/acf-json/post-types';
$paths[] = ABSBATH . '/wp-content/uploads/acf-json/field-groups';
$paths[] = ABSBATH . '/wp-content/uploads/acf-json/taxonomies';
$paths[] = ABSBATH . '/wp-content/uploads/acf-json/option-pages';
return $paths;
}
@blakemiller99
blakemiller99 / wc-catalog-mode
Created December 5, 2018 23:41
Woocommerce - Remove Price & Add to Cart Button (Catalog Mode)
// Hide Price, add to cart
add_action( 'init', 'mito_hide_price_add_cart' );
function mito_hide_price_add_cart() {
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
}
@blakemiller99
blakemiller99 / wp-remove-posts-type
Last active November 23, 2022 13:52
Remove Posts from WordPress
// ************* Remove default Posts type since no blog *************
// Remove side menu
add_action( 'admin_menu', 'remove_default_post_type' );
function remove_default_post_type() {
remove_menu_page( 'edit.php' );
}
// Remove +New post in top Admin Menu Bar