Cafetería ('-' * 9) Plantilla parallax para cafeterías
A Pen by Alberto Marín on CodePen.
<?php | |
/** | |
* Functions to create titles and slugs | |
* Very rough function !! | |
* If you require a more customised solution | |
* Add your single title to a [$post_type__title_single] variable inside the if statement for the post type | |
*/ | |
function make_single_title($string) { | |
$to_single = preg_replace("/s\b/", "", $string); | |
return ucwords( $to_single ); |
[text text class:classname class:otherclassname placeholder "placeholder"] | |
[email* email placeholder "Email Address"] | |
[url* url placeholder "http://..."] | |
[tel* tel placeholder "Phone no."] | |
[range* number-slider min:0 max:100 placeholder "Ammount"] | |
[number* number-spinbox min:0 max:100 placeholder "Ammount"] |
/* | |
* Handling Errors using async/await | |
* Has to be used inside an async function | |
*/ | |
try { | |
const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
// Success 🎉 | |
console.log(response); | |
} catch (error) { | |
// Error 😨 |
# Your snippets | |
# | |
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
# expand the prefix into a larger code block with templated values | |
# | |
# Atom Flight Manual: | |
# http://flight-manual.atom.io/using-atom/sections/basic-customization/#_cson | |
# | |
'.text.html': | |
'AMP HTML Project': |
#!/bin/bash | |
PARAMS=('-m 6 -q 70 -mt -af -progress') | |
if [ $# -ne 0 ]; then | |
PARAMS=$@; | |
fi | |
cd $(pwd) |
function translate_woocommerce($translation, $text, $domain) { | |
if ($domain == 'woocommerce') { | |
switch ($text) { | |
case 'SKU': | |
$translation = 'Product Code'; | |
break; | |
case 'SKU:': | |
$translation = 'Product Code:'; | |
break; |
Cafetería ('-' * 9) Plantilla parallax para cafeterías
A Pen by Alberto Marín on CodePen.
<?php | |
/** | |
* Shop/archives: wrap the product image/thumbnail in a div. | |
* | |
* The product image itself is hooked in at priority 10 using woocommerce_template_loop_product_thumbnail(), | |
* so priority 9 and 11 are used to open and close the div. | |
*/ | |
add_action( 'woocommerce_before_shop_loop_item_title', function(){ | |
echo '<div class="imagewrapper">'; |
This assumes you already have a Yeoman app and are ready for publishing
Create production directory & assets
<?php | |
/** | |
* Hide editor on specific pages. | |
* | |
*/ | |
add_action( 'admin_init', 'hide_editor' ); | |
function hide_editor() { | |
// Get the Post ID. |