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
<?php | |
/** | |
* Template Name: Sitemap | |
*/ | |
get_header(); | |
?> | |
<div id="primary" class="content-area"> | |
<main id="main" class="site-main"> |
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
First add the below html code where you want to show in the category.html, product.html and cart.html | |
<div class="shipping-bar-wrapper" data-coupon-code="{{lang 'freeDelivery'}}"></div> | |
Add the freeDevlivery(the coupon amount) text to the en.json file in the lang file. | |
Add this Js code to global.js in the assets/js/theme folder | |
fetch('/api/storefront/cart', { | |
credentials: 'same-origin' | |
}) | |
.then(function(response) { |
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 theme_free_user_bookmarkedlisting_shortcode( $atts, $content= null ) { | |
$user = wp_get_current_user(); | |
$current_user_id = $user->ID; | |
$base_url = get_site_url(); | |
global $wpdb; | |
$listingEntityId = $wpdb->get_results("SELECT vote_entity_id FROM wp_yjigapdowy_drts_voting_vote WHERE vote_field_name = 'voting_bookmark' AND vote_bundle_name='practitioner_dir_ltg' AND vote_user_id = $current_user_id AND vote_value = '1.00' "); |
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
$(window).resize(function() { | |
if($(this).innerWidth() > 800 && $(this).innerWidth() < 1367) { | |
if(/Ipad/i.test(navigator.userAgent)) { | |
$('Paste the navigation selector here').on('click', function(e) { | |
if($(this).hasClass('special class whether this one has submenu or not')) { | |
return false; | |
} | |
}) | |
} else if (/Mobi/i.test(navigator.userAgent)) { | |
$('Paste the navigation selector here').on('click', function(e) { |
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
It's better not to overwrite the default window event resize functionality. in order run a function on window resize, this method can be a good way | |
var addEvent = function(object, type, callback) { | |
if (object == null || typeof(object) == 'undefined') return; | |
if (object.addEventListener) { | |
object.addEventListener(type, callback, false); | |
} else if (object.attachEvent) { | |
object.attachEvent("on" + type, callback); | |
} else { | |
object["on"+type] = callback; | |
} |
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
node: { | |
fs: "empty" | |
} |
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
html | |
// add this after footer | |
<a href="#scrollto_top" class="scrolltop"><i class="fa fa-chevron-up"></i>Scroll to top</a> | |
// add id "top" to header element | |
css | |
.scrolltop { | |
display: none; | |
position: fixed; | |
bottom: 70px; |
NewerOlder