This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* You can put this in your footer.php file */ | |
/* This code checks if Spam robots type the City field in the WooCommerce checkout page as 'dsfsdf' and kicks them out */ | |
/* This can be modified to any condition you like by changing the if statements and event listeners around */ | |
<?php if( $post->ID == 2309 ) { ?> // change this to your Checkout page's ID | |
<script> | |
// get variables for the different fields in the woocommerce checkout form (note 'billing' vs 'shipping' side) | |
var cityfield = document.getElementById('billing_city'); | |
var postfield = document.getElementById('billing_postcode'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- You can add this to your footer.php file --> | |
<!-- UPS does'nt ship to PO Boxes, so if your site has multiple carriers (ex. USPS, FedEx & UPS) you would disable UPS for PO boxes --> | |
<!-- ** REPLACE ** the ID below to be the one for your WooCommerce checkout page !!!!!! --> | |
<?php if($post->ID == 2309) { // only works on checkout page ?> | |
<script> | |
// find the billing and shipping email fields to use for event listeners | |
// This code will fire when the customer clicks off of either email field |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="video" id="customvideo"> | |
<script src="https://fast.wistia.com/embed/medias/ugydl9lr6t.jsonp" async></script><script src="https://fast.wistia.com/assets/external/E-v1.js" async></script><div class="wistia_responsive_padding" style="padding:56.25% 0 0 0;position:relative;"><div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;"><div class="wistia_embed wistia_async_ugydl9lr6t videoFoam=true" style="height:100%;position:relative;width:100%"><div class="wistia_swatch" style="height:100%;left:0;opacity:0;overflow:hidden;position:absolute;top:0;transition:opacity 200ms;width:100%;"><img src="https://fast.wistia.com/embed/medias/ugydl9lr6t/swatch" style="filter:blur(5px);height:100%;object-fit:contain;width:100%;" alt="" aria-hidden="true" onload="this.parentNode.style.opacity=1;" /></div></div></div></div> | |
</div> | |
<script> | |
jQuery(window).bind("load", function () { | |
var customvideothumbnail = document.querySelector('#customvideo div.w-css-reset:nth-of-type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Let's say you have a series of images, and some are JPGs or PNGs, but some are GIFs too. If you want to remove the GIFs, you can do this. | |
Let's assume your HTML looked like this: | |
<div> | |
<img src="https://sqairz.com/wp-content/uploads/2021/04/freedom-white-silver-gif-600x394.gif"> | |
<img src="https://sqairz.com/wp-content/uploads/2021/04/Sqairz-Shoes_071-600x600.jpg"> | |
<img src="https://sqairz.com/wp-content/uploads/2021/04/freedom-white-silver-gif-600x394.gif"> | |
</div> | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- You can add this near the bottom of your footer.php --> | |
<!-- As an example, assume your checkout page had these 2 notifications by default --> | |
<!-- and you wanted to replace both of them: https://i.snipboard.io/MvmKWL.jpg --> | |
<?php if($post->ID == 353034) } /* Change this ID to match the ID of your checkout page */ ?> | |
<script> | |
var getAllWooMessages = document.getElementsByClassName("woocommerce-info"); | |
for (var i = 0; i < getAllWooMessages.length; i++) { | |
(function(x) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This goes in your functions.php file */ | |
/* When the woocommerce cart is updated on the page with ID 353034, print "test" at the top of the page */ | |
/* This is an example of using 2 functions together with an action hook */ | |
function action_woocommerce_cart_updated() { | |
add_action('get_header', function() { | |
if (is_page('353034')) { | |
echo 'test'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This would go in your functions.php file | |
// Clear things out of the cart the first time you visit a specific page (only run this script once) | |
add_action( 'template_redirect', 'clear_cart_items_custom_checkout' ); | |
function clear_cart_items_custom_page() { | |
global $post; | |
$slug = $post->post_name; | |
if($slug == 'exclusive-invitation') { // Replace this with the Slug of the page you want to clear the cart on | |
global $woocommerce; | |
$woocommerce->cart->empty_cart(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="application/ld+json">{ | |
"@context": "http://schema.org/", | |
"@type": "Review", | |
"reviewBody": "They make you feel safe and taken care of. They take care of so much, they really reduce the anxiety.", | |
"itemReviewed": { | |
"@type": "LegalService", | |
"name": "Rose, Klein & Marias LLP", | |
"telephone": "(800) 362-7427", | |
"address": { | |
"@type": "PostalAddress", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="application/ld+json"> | |
{ | |
"@context": "https://schema.org", | |
"@type": "Attorney", | |
"name": "Rose, Klein & Marias LLP", | |
"alternateName": " Rose, Klein & Marias", | |
"description": "Los Angeles personal injury attorneys", | |
"url" : "https://www.rkmlaw.com", | |
"logo" : "https://www.rkmlaw.com/wp-content/uploads/2019/11/RKMlogo.jpg", | |
"image" : "https://www.rkmlaw.com/wp-content/uploads/2019/11/att-riffel.jpg", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="application/ld+json"> | |
{ | |
"@context": "http://www.schema.org", | |
"@type": "LegalService", | |
"name": "The Dominguez Firm", | |
"telephone": "(800) 818-1818", | |
"priceRange": "$$$", | |
"url": "https://dominguezfirm.com", | |
"sameAs": [ | |
"https://twitter.com/DominguezFirm", |