Skip to content

Instantly share code, notes, and snippets.

View TANVIRFAZLEY's full-sized avatar
🎯
Focusing

Tanvir Fazley TANVIRFAZLEY

🎯
Focusing
View GitHub Profile
@TANVIRFAZLEY
TANVIRFAZLEY / gist:fcabc9ac9c0896073447009a25d322e9
Created February 12, 2021 12:47 — forked from oooh-boi/gist:3e3fbb773ebbd647b92de8880aa4c5ef
CSS and jQuery code used in "Custom Slider in Elementor built with Elementor" video tutorial
/* ---------- CSS
- should be "attached" to the master Section */
/* make 100% wide columns possible for Desktop devices in Elementor */
.custom-swiper .elementor-container .elementor-row {
/*flex-wrap: wrap;*/
}
/* make all the colums-slides 100% wide and full screen tall */
.custom-swiper > .elementor-container > .elementor-row > .elementor-element.elementor-column {
width: 100%;
@TANVIRFAZLEY
TANVIRFAZLEY / min-price.php
Created November 26, 2020 17:44
Display WooCommerce minimum variable product price only
<?php
function wc_varb_price_range( $wcv_price, $product ) {
$prefix = sprintf('%s: ', __('From', 'wcvp_range'));
$wcv_reg_min_price = $product->get_variation_regular_price( 'min', true );
$wcv_min_sale_price = $product->get_variation_sale_price( 'min', true );
$wcv_max_price = $product->get_variation_price( 'max', true );
$wcv_min_price = $product->get_variation_price( 'min', true );
@TANVIRFAZLEY
TANVIRFAZLEY / max-price.php
Created November 26, 2020 17:43
Display WooCommerce highest variable product price only
<?php
function con_show_max_variation_price_only( $price, $product ) {
// Main Variation Price
$prices = array( $product->get_variation_price( 'max', true ), $product->get_variation_price( 'min', true ) );
$price = $prices[0] !== $prices[1] ? sprintf( __( '%1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );
@TANVIRFAZLEY
TANVIRFAZLEY / data.json
Last active October 8, 2022 11:54 — forked from hasinhayder/data.json
Wp Quick Configurator Data
{
"themes": [
"astra",
],
"plugins": [
"elementor",
"woocommerce",
"classic-editor",
"essential-addons-for-elementor-lite",
"all-in-one-wp-migration",
@TANVIRFAZLEY
TANVIRFAZLEY / customizer.php
Created August 17, 2020 03:07
customizer
<?php
function sermon_customizer_settings($wp_customizer){
$wp_customizer->add_section('sermon_settings', array(
'title' => esc_html__('Sermon Options', 'sermon'),
'priority' => 0,
));
/**
@TANVIRFAZLEY
TANVIRFAZLEY / responsive.css
Created July 5, 2020 13:24
media query css
/* Medium Layout: 1280px. */
@media only screen and (min-width: 992px) and (max-width: 1200px) {}
/* Tablet Layout: 768px. */
@media only screen and (min-width: 768px) and (max-width: 991px) {
}
@TANVIRFAZLEY
TANVIRFAZLEY / comments-callback.php
Created May 19, 2020 17:37
Custom comment Callback function
<?php
function morus_comments( $comment, $args, $depth ) {
if ( 'div' == $args['style'] ) {
$tag = 'div';
$add_below = 'div-comment';
} else {
$tag = 'li';
$add_below = 'comment';
}
@TANVIRFAZLEY
TANVIRFAZLEY / comments.php
Last active October 8, 2022 11:54
comments template count title
<?php
$morus_comment_count = get_comments_number();
if ( $morus_comment_count <= 1 ) {
echo "(" . esc_html( $morus_comment_count ) . ")" . __( ' Comment', 'morus' );
} else {
echo "(" . esc_html( $morus_comment_count ) . ")" . __( ' Comments', 'morus' );
}
?>
@TANVIRFAZLEY
TANVIRFAZLEY / search.php
Created May 10, 2020 18:04
Get custom search form
<?php
//MORUS SEARCH
function morus_search_form() {
$home_url = esc_url( get_home_url( '/' ) );
$value = esc_attr( get_search_query() );
$lable = __( 'Search', 'morus' );
$form = <<<FORM
<form action="{$home_url}" method="GET">
<input name="s" value="{$value}" type="text" placeholder="{$lable}" class="form-control" id="search_input">
@TANVIRFAZLEY
TANVIRFAZLEY / el-repeater-control.php
Created March 22, 2020 00:48
repeater control for elementor
<?php
$this->add_control( 'testimonial_items', [
'label' => esc_html__( 'Testimonial Item', 'appside-master' ),
'type' => Controls_Manager::REPEATER,
'default' => [
[
'designation' => esc_html__( 'Technician', 'appside-master' ),
],