This file contains 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
<!-- Meta Pixel Code --> | |
<script> | |
!function(f,b,e,v,n,t,s) | |
{if(f.fbq)return;n=f.fbq=function(){n.callMethod? | |
n.callMethod.apply(n,arguments):n.queue.push(arguments)}; | |
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; | |
n.queue=[];t=b.createElement(e);t.async=!0; | |
t.src=v;s=b.getElementsByTagName(e)[0]; | |
s.parentNode.insertBefore(t,s)}(window, document,'script', | |
'https://connect.facebook.net/en_US/fbevents.js'); |
This file contains 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
function wc_billing_field_strings( $translated_text, $text, $domain ) { | |
switch ( $translated_text ) { | |
case 'Billing details' : | |
$translated_text = __( 'Billing Info', 'woocommerce' ); | |
break; | |
} | |
return $translated_text; | |
} | |
add_filter( 'gettext', 'wc_billing_field_strings', 20, 3 ); |
This file contains 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
Code Snippet | |
// Automatically shortens WooCommerce product titles on the main shop, category, and tag pages | |
// to a set number of characters | |
function short_woocommerce_product_titles_chars( $title, $id ) { | |
if ( ( is_shop() || is_product_tag() || is_product_category() ) && get_post_type( $id ) === 'product' ) { | |
// Kicks in if the product title is longer than 60 characters | |
if ( strlen( $title ) > 40) { | |
// Shortens it to 60 characters and adds ellipsis at the end | |
return substr( $title, 0, 40 ) . '...'; |
This file contains 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
define('ALLOW_UNFILTERED_UPLOADS', true); |
This file contains 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
.woocommerce button[name="update_cart"], | |
.woocommerce input[name="update_cart"] { | |
display: none!important; | |
} | |
==================================================================== | |
add_action( 'wp_footer', function() { | |
This file contains 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
Created header using this plugin: https://wordpress.org/plugins/header-footer-elementor/ | |
Step 1 – Now edit the above header in Elementor and add a Custom ID to the outermost section (here we are using my-custom-id ). | |
Step 2 – Now add following custom CSS. You can add it to the customizer under the ‘Additional CSS’ section or use | |
any external plugin that provides an area to add custom CSS. | |
#custom-sticky-section.elementor-section{ | |
position: fixed; | |
left: 0; |
This file contains 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
[timed-content-server show="2022-08-30 19:35 UTC"]Show content after August 30, 2022 and 7:35 PM UTC Timezone[/timed-content-server] | |
[timed-content-server hide="2022-08-30 19:35 UTC"]Hide content after August 30, 2022 and 7:35 PM UTC Timezone[/timed-content-server] |
This file contains 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
?add-to-cart=25&quantity=1 |
This file contains 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
add_action( 'template_redirect', 'bhww_ssl_template_redirect', 1 ); | |
function bhww_ssl_template_redirect() { | |
if ( is_ssl() && ! is_admin() ) { | |
if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) { | |
wp_redirect( preg_replace( '|^https://|', 'http://', $_SERVER['REQUEST_URI'] ), 301 ); | |
exit(); |
NewerOlder