Skip to content

Instantly share code, notes, and snippets.

@Giannisduke
Giannisduke / functions.php
Created February 10, 2021 06:47 — forked from farookibrahim/functions.php
Electro display tags in archive
if ( ! function_exists( 'electro_template_loop_tags' ) ) {
/**
* Output Product Tags
*
*/
function electro_template_loop_tags() {
global $product;
$product_id = electro_wc_get_product_id( $product );
$tags = wc_get_product_tag_list( $product_id );
@Giannisduke
Giannisduke / functions.php
Last active September 30, 2020 09:44
woocommerce - Remove Stock message from Product
function my_wc_hide_in_stock_message( $html, $product ) {
if ( $product->is_in_stock() ) {
return '';
}
return $html;
}
add_filter( 'woocommerce_get_stock_html', 'my_wc_hide_in_stock_message', 10, 2 );
@Giannisduke
Giannisduke / custom-hooks.php
Created September 26, 2020 14:59 — forked from djrmom/custom-hooks.php
facetwp loading animation to cover all facets
<?php
/** sample of css and js to create a custom loading animation to cover the full facet area
** change #facet-container to a id or class of container element for your facets
** update css as needed
** please see https://facetwp.com/documentation/support/ for questions
**/
add_action( 'wp_head', function() { ?>
<style>
#facet-container {
@Giannisduke
Giannisduke / form-login.php
Created September 11, 2020 18:39 — forked from robbens/form-login.php
Bootstrap 4 login and register form for Woocommerce. This should be placed in "your-theme/woocommerce/myaccount/form-login.php".
<?php
/**
* Login Form
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-login.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
@Giannisduke
Giannisduke / facetwp_date_range_in_single_calendar.php
Created May 4, 2020 14:54 — forked from brainstormer59/facetwp_date_range_in_single_calendar.php
This snippet for the wordpress facetwp plugin is used to group the two facets (start and end) generated by the date_range facet when "Fields to show" is set to "Start + End Dates".
<?php
add_action( 'wp_footer', 'facetwp_date_range_in_single_calendar',100);
function facetwp_date_range_in_single_calendar() {
?>
<script>
(function($) {
if ( 'undefined' !== typeof FWP ) {
FWP.hooks.addFilter('facetwp/set_options/date_range', function(flatpickr_opts, extras) {
@Giannisduke
Giannisduke / functions.php
Created May 4, 2020 11:27 — forked from djrmom/functions.php
facetwp replace woocommerce sort with facet sort
<?php
if ( ! function_exists( 'woocommerce_catalog_ordering' ) ) {
/**
* Output facet sort box instead of woocommerce's
*/
function woocommerce_catalog_ordering() {
echo facetwp_display( 'sort' );
}
}
<?php
/*
* This code uses the original function and
* adds a shortcode functionality to display the product loop with
* the products that are available adding also another shortcode for
* products that are unavailable
*
* Usage: [bookable_products start="2019-10-10" end="2019-10-15"]
* [unbookable_products start="2019-10-10" end="2019-10-15"]
*
@Giannisduke
Giannisduke / WooCommerce-Bookings-list-person-types.txt
Created May 4, 2020 07:44 — forked from conschneider/WooCommerce-Bookings-list-person-types.txt
WooCommerce Bookings template for displaying Persons and it's meta info of a booking product
<?php
/*
Template Name: Bookings Person types list
*/
?>
<?php get_header(); ?>
<?php
/* globals FWP */
/**
* JavaScript for FacetWP Infinite Scroll
*/
( function( $ ) {
'use-strict';
var throttleTimer = null;
var throttleDelay = 100;
<?php
/*
Plugin Name: Super Socializer
Plugin URI: https://super-socializer-wordpress.heateor.com
Description: A complete 360 degree solution to provide all the social features like Social Login, Social Commenting, Social Sharing, Social Media follow and more
Version: 7.12.25
Author: Team Heateor
Author URI: https://www.heateor.com
Text Domain: super-socializer
Domain Path: /languages