Skip to content

Instantly share code, notes, and snippets.

View ahmedeshaan's full-sized avatar

Ahmed Eshaan ahmedeshaan

View GitHub Profile
add_filter( 'woocommerce_product_add_to_cart_text', 'custom_loop_add_to_cart_button', 20, 2 );
add_filter( 'woocommerce_product_single_add_to_cart_text', 'custom_loop_add_to_cart_button', 20, 2 );
function custom_loop_add_to_cart_button( $button_text, $product ) {
// HERE define your specific product IDs in this array
$specific_ids = array(10357339); // product id
if( in_array($product->get_id(), $specific_ids) ) {
$button_text = __("Subscribe now!", "woocommerce");
}
function fs_custom_login_css()
{
?>
<style type="text/css">
.login label {
display: inline-block !important;
}
.login .forgetmenot label {
position: relative;
top: -2px;
function flatsome_custom_ux_product_categories($atts, $content = null, $tag = '' ) {
$sliderrandomid = rand();
extract( shortcode_atts( array (
// Meta
'number' => null,
'_id' => 'cats-'.rand(),
'ids' => false, // Custom IDs
'title' => '',
'cat' => '',
[section padding="0px" class="wih-sec-cat"]
[row style="collapse" width="full-width"]
[col span__sm="12" margin="0px 0px -50px 0px" margin__sm="0px 0px 10px 0px" align="left"]
[ux_slider style="container" slide_width="180px" slide_width__sm="140px" slide_align="left" infinitive="false" hide_nav="true" nav_pos="outside" nav_size="normal" nav_style="simple" nav_color="dark" bullet_style="simple" auto_slide="false" class="wih-cat-slider"]
[row_inner]
<?php
// Changing Header
function my_new_shortcode_latest_from_blog($atts, $content = null, $tag = '' ) {
extract(shortcode_atts(array(
"_id" => 'row-'.rand(),
'style' => '',
'class' => '',
from mfrc522 import MFRC522
from utime import sleep
from machine import Pin,I2C
from pico_i2c_lcd import I2cLcd
red = [0, "mather"]
pink = [0, "shlomit"]
blu = [0, "yoval"]
yellow = [0, "magen"]
# CONSTANTS
<?php
function woocommerce_template_loop_product_title() {
echo '<h2 class=“name product-title' . esc_attr( apply_filters( 'woocommerce_product_loop_title_classes', 'woocommerce-loop-product__title' ) ) . '“>';
woocommerce_template_loop_product_link_open();
echo get_the_title(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
woocommerce_template_loop_product_link_close();
echo '</h2>';
}
1. open functions.php (from the active theme), and add this code to it:
https://gist.github.com/JimmyAppelt/5bd19fbd3d336bbd78e701893aef321d
2. save the file
3. refresh the front end in the browser so the code runs (without cache!)
4. remove the code from functions.php
5. save the file
6. test the typography settings
[row]
[col span="3" span__sm="12"]
[ux_sidebar id="product-sidebar"]
[/col]
[col span="6" span__sm="12"]