How to clone a git repository (include passphrase) with vscode
First download private key (from manage-ssh cpanel or etc) after download you can copy your private key to ~/.ssh folder
cp your-key ~/.ssh
HTML + Bootstrap@v4
<section class="align-items-stretch bg-secondary "><div class="container d-flex flex-column "><div class="row my-4 py-4 "><div class="col-12 col-lg-6 col-xl-4">
<span class="text-primary f-bold mb-4 d-block">Calculate Your Body Mass Index</span>
<label for="height_bmi">Height(cm)</label>
<input type="number" name="height_bmi" class="d-block p-2 w-100" id="height_bmi" placeholder="height(cm)">
<?php | |
// redirect to checkout after click 'add to cart' - Woocommerce | |
add_filter ('add_to_cart_redirect', 'redirect_to_checkout'); | |
function redirect_to_checkout() { | |
global $woocommerce; | |
$checkout_url = $woocommerce->cart->get_checkout_url(); | |
return $checkout_url; | |
} |
A Pen by hosein shurabi on CodePen.
A Pen by hosein shurabi on CodePen.
A Pen by hosein shurabi on CodePen.
// Add content of Advance custom fields to description tab. | |
function add_acf_description_tab_content($data) { | |
woocommerce_product_description_tab(); | |
echo '<hr>'; | |
echo '<h3>Board Attributes</h3>'; | |
$ba = get_field('board_attributes'); // ba = board_attribute => get field board_attribute from acf | |
$ba_items = [ | |
// ['Attribute','value','image_url'] | |
['Terrian',$ba['terrain'],$ba['terrain_thumbnail']], |
<?php | |
// This code should be added to the functions.php file of the child theme | |
// Add WooCommerce Brands logo with description to Additional Information product tab | |
add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 ); | |
function woo_rename_tabs( $tabs ) { | |
global $product; | |
$tabs['additional_information']['callback'] = 'add_brand_to_info'; // this is the function name which is included below | |
return $tabs; | |
} |
INSERT INTO `wp_postmeta`(meta_id,post_id,meta_key,meta_value) VALUES | |
(24947,3352,'_stock',2),(24947,3352,'_stock',21) | |
ON DUPLICATE KEY UPDATE meta_value=VALUES(meta_value) |