Skip to content

Instantly share code, notes, and snippets.

// Get The Page ID You Need
get_option( 'woocommerce_shop_page_id' );
get_option( 'woocommerce_cart_page_id' );
get_option( 'woocommerce_checkout_page_id' );
get_option( 'woocommerce_pay_page_id' );
get_option( 'woocommerce_thanks_page_id' );
get_option( 'woocommerce_myaccount_page_id' );
get_option( 'woocommerce_edit_address_page_id' );
get_option( 'woocommerce_view_order_page_id' );
get_option( 'woocommerce_terms_page_id' );
@corsonr
corsonr / gist:8703820
Last active December 23, 2020 08:16
WooCommerce : Remove the "shop" title on the main shop page
<?php
/**
* Removes the "shop" title on the main shop page
*/
add_filter( 'woocommerce_show_page_title', '__return_false' );
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@srikat
srikat / functions.php
Last active June 17, 2019 13:48
How to remove Post Meta from Entry Footer in Genesis.
add_action( 'genesis_entry_content', 'sk_remove_post_meta' );
/**
* Remove Post Meta in Entry Footer site-wide excerpt on static Pages.
*
* @author Sridhar Katakam
* @link http://sridharkatakam.com/remove-post-meta-entry-footer-genesis/
*/
function sk_remove_post_meta() {
if ( is_singular( 'page' ) ) {
return;
@bananana
bananana / wp-update.sh
Last active September 17, 2023 21:07
Bash script to run automatic updates and backups using wp-cli
#!/bin/bash
#
# Backup and update WordPress using wp-cli
#
# Set the -e shell option so the script exits immediately if any command within
# it exits with a non-zero status.
set -e
# Set PATH environment variable
@chrismcintosh
chrismcintosh / acf_populate_custom_tax.php
Last active April 30, 2017 15:59
Some boilerplate code for populating an ACF select box with custom taxonomies and then querying a custom post type using the result of that select box.
<?php
/*
Assumes a custom post type called 'staff'
Assumes that there is a custom taxonomy called 'department'.
Every department that has at least one staff member assigned to it will
populate a select field that is specified in Advanced Custom Fields.
Using that Select field we can then do a query on a custom post type
in this case staff and grab only the staff with our selected department.
@cyberwani
cyberwani / contact-form-7-assets-on-form-page.php
Created July 15, 2017 04:36
Contact Form 7 plugin: Load Javascript and CSS on Pages, Posts and CPTs where Contact Form 7 shortcode is used.
<?php
// Unload CF7 assests
add_filter( 'wpcf7_load_js', '__return_false' );
add_filter( 'wpcf7_load_css', '__return_false' );
add_action( 'the_content', 'load_cf7_assets' );
function load_cf7_assets($content){
global $post;
@Andy-set-studio
Andy-set-studio / reset.css
Last active September 21, 2020 15:19
Minimal CSS reset
/* Box sizing rules */
* {
box-sizing: border-box;
}
*:before,
*:after {
box-sizing: inherit;
}
@cferdinandi
cferdinandi / README.md
Created October 15, 2020 15:45
A vanilla JS fork of Lettering.js