Skip to content

Instantly share code, notes, and snippets.

View LeMiira's full-sized avatar
🏠
Working from home

Mira LeMiira

🏠
Working from home
View GitHub Profile
@LeMiira
LeMiira / yoast-php
Created October 24, 2022 21:50
Yoast Seo support
<?php
add_theme_support( 'title-tag' );
?>
<table>
<tbody>
<tr>
<td>
<div><label>CCL Business Segment</label>
<p>Food &amp; Beverage</p></div>
<div><label>Site Location</label>
<p>Holzkirchen, Germany</p></div>
</td>
<td> <div><label>CCL Team Lead</label>
@LeMiira
LeMiira / elementor_meta_query_stock.php
Created September 22, 2022 11:44
meta_query elementor query in stock woocommerce order hack
<?php
add_action( 'elementor/query/brandProductsQuery', function( $query ) {
$meta_query[] = [
'key' => '_stock_status',
'value' => 'instock',
'compare' => '=',
];
$query->set('meta_query', $meta_query);
});
@LeMiira
LeMiira / gist:0ee2e366a6b1900bcb47e300f041ec02
Created September 16, 2022 10:51
whatsapp url api send message
https://api.whatsapp.com/send/?phone=9055555555555&text=Merhaba
@LeMiira
LeMiira / fix.txt
Created September 13, 2022 10:42
please enter an address to continue. woocommerce error
billing country MUST NOT be mandatory
add_filter('woocommerce_billing_fields', 'vg_customize_checkout_form');
function vg_customize_checkout_form($fields)
{
$fields['billing_city']['required'] = false;
return $fields;
@LeMiira
LeMiira / google-detect.php
Created July 21, 2022 10:55
Detect Google Bots
<?php
$remote_add=$_SERVER['REMOTE_ADDR'];
$hostname = gethostbyaddr($remote_add);
$googlebot = 'googlebot.com';
$google = 'google.com';
if (stripos(strrev($hostname), strrev($googlebot)) === 0 or stripos(strrev($hostname),strrev($google)) === 0 )
{
//add your code
}
?>
@LeMiira
LeMiira / woocommerce-min.php
Created July 12, 2022 10:11
Set min amount on woocommerce
function disablegateways( $gateways ) {
if( is_admin() ) {
return $gateways;
}
if ( isset( $gateways[ 'stripe' ] ) ) {
unset( $gateways[ 'stripe' ] );
}
<!DOCTYPE html>
<html lang="en-GB"><head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" /> <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1" />
<!-- This site is optimized with the Yoast SEO plugin v19.0 - https://yoast.com/wordpress/plugins/seo/ -->
<title>Home Care in Essex | Domiciliary &amp; Live-in Care Services</title>
<meta name="description" content="Compare Essex home care agencies &amp; providers in our trusted guide. Domiciliary care, live-in care &amp; specialist Dementia care in Essex" />
<link rel="canonical" href="https://www.agespace.org/county/essex" />
<link rel="next" href="https://www.agespace.org/county/essex/page/2" />
<!DOCTYPE html>
<html lang="en-GB"><head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" /> <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1" />
<!-- This site is optimized with the Yoast SEO plugin v19.0 - https://yoast.com/wordpress/plugins/seo/ -->
<title>Home Care in Essex | Domiciliary &amp; Live-in Care Services</title>
<meta name="description" content="Compare Essex home care agencies &amp; providers in our trusted guide. Domiciliary care, live-in care &amp; specialist Dementia care in Essex" />
<link rel="canonical" href="https://www.agespace.org/county/essex" />
<link rel="next" href="https://www.agespace.org/county/essex/page/2" />
<script>
jQuery(document).ready(function($){
setTimeout(function(){
$('.flatpickr-input').each(function(){ flatpickr( $(this)[0] ).set('dateFormat', 'd/m/Y');}); }, 1000 );
});
</script>