Skip to content

Instantly share code, notes, and snippets.

@LimeDrive
LimeDrive / ygg-api.yml
Created August 21, 2024 14:53
Indexer non officielle pour ygg.re
id: yggapi
name: Ygg API
description: "Indexeur non officiel pour ygg.re"
language: fr-FR
type: private
encoding: UTF-8
followredirect: true
testlinktorrent: false
links:
- https://yggapi.eu
@jan-koch
jan-koch / email-order-items.php
Last active April 17, 2021 15:41
Email order items template from WooCommerce, containing a custom snippet to show a custom SKU for each product - only in admin emails. This file goes into wp-content/themes/your-child-theme/woocommerce/emails.
<?php
/**
* Email Order Items
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-order-items.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
@jan-koch
jan-koch / woo-add-custom-sku.php
Last active July 16, 2021 10:39
Add a custom SKU field to WooCommerce products.
<?php
function jk_add_custom_sku() {
$args = array(
'label' => __( 'Custom SKU', 'woocommerce' ),
'placeholder' => __( 'Enter custom SKU here', 'woocommerce' ),
'id' => 'jk_sku',
'desc_tip' => true,
'description' => __( 'This SKU is for internal use only.', 'woocommerce' ),
);
@jan-koch
jan-koch / woo-text-input.php
Created November 15, 2018 10:35
Example for adding a text input field to the WooCommerce "General" tab.
<?php
function prefix_add_text_input() {
$args = array(
'label' => '', // Text in the label in the editor.
'placeholder' => '', // Give examples or suggestions as placeholder
'class' => '',
'style' => '',
'wrapper_class' => '',
'value' => '', // if empty, retrieved from post_meta
'id' => '', // required, will be used as meta_key
@alexmustin
alexmustin / form-content.html
Created February 4, 2018 21:31
WordPress AJAX Live Search of Post Title
<!-- // The HTML (could be part of page content) // -->
<input type="text" name="keyword" id="keyword" onkeyup="fetch()"></input>
<div id="datafetch">Search results will appear here</div>