Skip to content

Instantly share code, notes, and snippets.

View peazz's full-sized avatar

Andy Cresswell peazz

View GitHub Profile
@hereswhatidid
hereswhatidid / acf-fields.php
Last active April 18, 2018 17:31
Create custom product details tabs within WooCommerce using an ACF (Advanced Custom Fields) Repeater field.
<?php
if( function_exists('acf_add_local_field_group') ):
acf_add_local_field_group(array (
'key' => 'acf_product_options',
'title' => 'Product Options',
'fields' => array (
array (
'key' => 'acf_product_options_tabbedcontent_label',
'label' => 'Tabbed Content',
@jaybuys
jaybuys / functions.php
Last active December 29, 2019 01:32
WordPress Visual Composer Mods
function vc_update_defaults() {
// Default single image to size "full"
$param = WPBMap::getParam( 'vc_single_image', 'img_size' );
$param['value'] = 'full';
vc_update_shortcode_param( 'vc_single_image', $param );
// Modify button 2 styles to use custom colors
$colors_arr = array(
__( 'Custom Color #1', 'js_composer' ) => 'custom_classname_1',
__( 'Custom Color #2', 'js_composer' ) => 'custom_classname_2'
@tjhole
tjhole / WORDPRESS: Base64 Image to Wordpress Uploads directory
Created May 9, 2014 12:35
WORDPRESS: Base64 Image to Wordpress Uploads directory
function tattoo_submit() {
if (isset($_POST["addtattoo"])) {
$title = "Tattoo : ". $_POST["tatooInput"];
$my_post = array(
'post_title' => $title,
'post_status' => 'publish',
'post_author' => 1,