Skip to content

Instantly share code, notes, and snippets.

View asifpix's full-sized avatar

Asif Islam asifpix

  • iThemesLab
  • Bangladesh
View GitHub Profile
@asifpix
asifpix / travelux_tour_render.php
Created July 13, 2021 05:23
It will display min price in tour search result page.
<?php
class Travelux_Tour_Render {
private function __construct() {
$this->actions();
}
public static function init(){
static $instance = false;
if( ! $instance ) {
$instance = new self();
@asifpix
asifpix / ratings.php
Created June 6, 2021 05:07
It will display the lowest price of variable products.
<?php
trait Ratings {
public function display_tour_grid_destination() {
global $post;
$destination_name = get_the_terms($post->ID, 'destination');
if ($destination_name){
printf('<p>%s</p>', esc_html($destination_name[0]->name));
}
}
public function tour_grid_review_query() {
<?php
get_header();
$getDestination = isset($_GET['tl_destination']) ? $_GET['tl_destination'] : '';
$getTourType = isset($_GET['tl_type']) ? $_GET['tl_type'] : '';
$getDuration = isset($_GET['tl_duration']) ? $_GET['tl_duration'] : '';
$tax_query = array(
'relation' => 'OR',
array (
'taxonomy' => 'destination',
'terms' => $getDestination,
@asifpix
asifpix / project.php
Created March 5, 2021 05:06
Removed select field and added text field to increase the item count on project VC addon.
<?php
function itl_isotope_scripts() {
wp_enqueue_script( 'isotope-script', plugins_url() . '/imperial-core/assets/js/isotope-scripts.js', array( 'isotope' ), false, true );
}
add_action( 'wp_enqueue_scripts', 'itl_isotope_scripts' );
add_shortcode( 'itl_project', function( $atts, $content = null ) {
extract( shortcode_atts( array(
'item_count' => '8',
'column' => '4',
<?php
class Travelux_Tours extends \Elementor\Widget_Base {
use Ratings;
public function get_name() {
return 'travelux_tours';
}
public function get_title() {
return __('Tours', 'travelux-core');
}
<?php
namespace UniAlumni;
class UniAlumni_Assets {
public function __construct() {
add_action( 'wp_enqueue_scripts', [$this, 'unialumni_enqueue_styles'] );
add_action( 'wp_enqueue_scripts', [$this, 'unialumni_enqueue_scripts'] );
<section class="pt-5">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-12">
<h2 class="text-primary mb-4">Want to leave us a message?</h2>
<p class="h5 mt-4">Please submit your details and one of our highly experienced recruitment <br>
consultants will contact you soon.</p>
<div class="form-wrapper mt-5">
<div class="row">
<div class="col-md-6">
<section class="pt-5 cv-form">
<div class="form-wrapper mt-5">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="fullname">FULL NAME</label>
[text* full_name id:fullname class:form-control class:shadow-none placeholder "Full Name"]
</div>
<div class="form-group">
<label for="email">EMAIL</label>
<?php
class Travelux_Terms extends \Elementor\Widget_Base {
use Term_Controls;
public function get_name() {
return 'travelux_terms';
}
public function get_title() {
return __( 'Terms', 'travelux-core' );
}
@asifpix
asifpix / Travelux Core
Created September 26, 2019 07:55
Autoloader also looking for theme's class file.
<?php
/**
* Plugin Name: Travelux Core
* Plugin URI: http://ithemeslab.com/
* Description: Extends the functionality of Travelux Theme.
* Version: 1.0.0
* Author: iThemesLab
* Author URI: https://ithemeslab.com/
* Text Domain: travelux-core
* Domain Path: /languages