wp-content/themes/flatsome/inc/admin/gutenberg/assets/css/style.css
.block-editor #uxbuilder-edit-button {
display: inline-flex;
align-items: center;
margin-left: -200px;
height: 36px;
}
wp-content/themes/flatsome/inc/admin/gutenberg/assets/css/style.css
.block-editor #uxbuilder-edit-button {
display: inline-flex;
align-items: center;
margin-left: -200px;
height: 36px;
}
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('a[href*="https://www.youtube.com/watch?"]').each(function() {
$(this).attr('data-fancybox','');
});
$('a[href*="https://youtu.be/"]').each(function() {
$(this).attr('data-fancybox','');
});
});
</script>
<script>
$(document).ready(function(){
// Add smooth scrolling to all links
$("a").on('click', function(event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash
var hash = this.hash;
// Using jQuery's animate() method to add smooth page scroll
// The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 800, function(){
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
} // End if
});
});
</script>
Aggiungendo il codice in tutte le pagine non ci sono problemi
il clic si attiva su ID dell’elemento sia un <p> o un <div>
va inserito dentro la pagina specifica
<script src="https://code.jquery.com/jquery-2.1.3.min.js">
</script><script type="text/javascript">
$(function() {$('a[href*=#]:not([href=#])').click(function() {if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {var target = $(this.hash);target = target.length ? target : $('[name=' + this.hash.slice(1) +']');if (target.length) {$('html,body').animate({scrollTop: target.offset().top}, 1000);return false;}}});});
</script>
si aggiunge un nuovo blocco di codice
<a name="special"></a>
cabhal ea3688a183314df46706ab1f87d457d61acc8d54
file woocommerce-cart-add-ons.php
cercare la linea <ul class=”products sfn-cart-addons”>
<ul class="products sfn-cart-addons row large-columns-4 medium-columns-3 small-columns-1 row-small">
AGGIUNGI AL FILE woocommerce-cart-add-ons.php (riga 71 circa)
//checkout page
add_action('woocommerce_after_checkout_form', array($this, 'cart_display_addons'), 20);
Per modificare l’ordine dei vari elementi portfolio su Flatsome è necessario modificare il file in /inc/post-types/post-type-ux-portfolio.php
impostare ‘hierarchical’ => false
<script>
jQuery( document ).ready(function($) {
var isMobile = window.matchMedia("only screen and (max-width: 760px)").matches;
if (isMobile) {
//Conditional script here
}
});
</script>
il file per modificare la visualizzazione della pagina https://www.dominiveneti.it/cultura-vino/ si trova in /themes/bridge/includes/shortcodes/sortcode-elements/portfolio-list.php
<div class="rwd-video">
<iframe src="//www.youtube.com/embed/ID-VIDEO?rel=0" allowfullscreen="" frameborder="0" height="360" width="640">
</iframe>
</div>
.rwd-video {
height: 0;
overflow: hidden;
padding-bottom: 56.25%;
padding-top: 30px;
position: relative;
}
.rwd-video iframe,
.rwd-video object,
.rwd-video embed {
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
Bisogna mantenere la proporzione di 56,25% che è il rapporto di 16/9 (9/16 = 0,5625)
Per calcolare ampiezze differenti: altezza*0,5625: 640*0,5625 = 360 e manterrà l’aspect ratio
Questo snipet di codice consente di ricercare un codice coupon nelle tabelle giuste e di estrapolare l’indirizzo email di chi lo ha utilizzato
SELECT meta_value as EMAIL_CLIENTE from wpdx_postmeta WHERE meta_key = '_billing_email' AND post_id IN ( SELECT order_id FROM wpdx_woocommerce_order_items WHERE order_item_name = 'domini30anni' );
VERSIONE POTENTE – Cerca da una certa data in poi o in un range di date
SELECT meta_value as EMAIL_CLIENTE from wpdx_postmeta WHERE meta_key = '_billing_email' AND post_id IN ( SELECT post_id as ID from wpdx_postmeta WHERE meta_key = '_completed_date' AND meta_value >= '2019-03-05' AND meta_key = '_completed_date' AND meta_value <= '2019-03-30' AND post_id IN ( SELECT order_id FROM wpdx_woocommerce_order_items WHERE order_item_name = 'domini30anni' ));