Skip to content

Instantly share code, notes, and snippets.

View mlangone's full-sized avatar

Mike Langone mlangone

  • Gilbert, Arizona
View GitHub Profile
@mlangone
mlangone / disable-comments.sh
Created September 11, 2019 16:37 — forked from jplhomer/disable-comments.sh
Disable all comments/pings in WordPress with WP-CLI
$ wp post list --format=ids | xargs wp post update --comment_status=closed
# Output:
# Success: Updated post 2514.
# Success: Updated post 2511.
# Success: Updated post 2504.
# Success: Updated post 2499.
# Success: Updated post 2441.
# etc...
@mlangone
mlangone / functions.php
Created December 30, 2019 20:01 — forked from maddisondesigns/functions.php
WooCommerce Custom Fields for Simple & Variable Products
/*
* Add our Custom Fields to simple products
*/
function mytheme_woo_add_custom_fields() {
global $woocommerce, $post;
echo '<div class="options_group">';
// Text Field
@mlangone
mlangone / fix gitignore.md
Created October 30, 2020 01:27 — forked from mohokh67/fix gitignore.md
Fix the .gitignore and untrack files which are already added

Untrack files which are already added in gitignore file

  1. Commit all your changes

  2. Remove everything from the repository cache. Go to your repo directory and run this command.

git rm -r --cached .

It will only clear the cache. Your files and git history will stay.