Skip to content

Instantly share code, notes, and snippets.

View celticwebdesign's full-sized avatar

Darren Stevens celticwebdesign

View GitHub Profile
@celticwebdesign
celticwebdesign / .gitignore
Created June 6, 2019 10:47 — forked from salcode/.gitignore
Please see https://salferrarello.com/wordpress-gitignore/ for the canonical version of this WordPress .gitignore file. Note: I do not receive notifications for comments here (because GitHub does not send notifications on Gists)
# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20180808
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore
# to download this file
#
# By default all files are ignored. You'll need to whitelist
# any mu-plugins, plugins, or themes you want to include in the repo.
# Ignore everything #
**
!wp-content/
wp-content/**
!wp-content/themes/
!wp-content/plugins/
wp-content/themes/**
wp-content/plugins/**
# Add two rules for each Theme or Plugin you want to include:
@celticwebdesign
celticwebdesign / content-product.php
Last active April 3, 2024 12:12 — forked from croosen/content-product.php
WooCommerce - Display custom attributes on shop page - including attribute thumbnails
<?php
// this gist requires: http://candlestudio.net/woocommerce/plugins/button-variations/
// a fork of: https://gist.github.com/croosen/24a2845f91ce91a2819b
// WooCommerce - Display custom attributes on shop page - the official way ;-)
global $wc_ea_term_meta;
// Get the attributes
<?php
global $post;
$author_id=$post->post_author;
// echo gettype( $author_id );
// echo "<pre>";
// print_r( $author_id );
// echo "</pre>";
// https://codex.wordpress.org/Function_Reference/the_author_meta