You'll need to open the Customizer, then select WooCommerce, then Product Images. select uncropped https://stackoverflow.com/a/28784657
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
root{ | |
--linear: cubic-bezier( 0.250, 0.250, 0.750, 0.750 ); | |
--ease: cubic-bezier( 0.250, 0.100, 0.250, 1.000 ); | |
--easein: cubic-bezier( 0.420, 0.000, 1.000, 1.000 ); | |
--easeout:cubic-bezier( 0.000, 0.000, 0.580, 1.000 ); | |
--easeinout:cubic-bezier( 0.420, 0.000, 0.580, 1.000 ); | |
--outquad:cubic-bezier( 0.250, 0.460, 0.450, 0.940 ); | |
--outcubic:cubic-bezier( 0.215, 0.610, 0.355, 1.000 ); |
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 | |
/* code à ajouter au functions.php | |
// WOOCOMMERCE special styling | |
// charge une css à ajouter dans le dossier du child-theme enfold perso APRES celle d'Enfold -> du coup elle prend le dessus | |
function wc29d_scripts(){ | |
wp_enqueue_style( 'wc29d-css', get_stylesheet_directory_uri() . '/wc_29degres.css', array('avia-style'), null ); | |
} | |
// chagement des styles et scripts |
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
#place htaccess in subfolder | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
#redirect /folder to root | |
RewriteRule ^(.*)$ /$1 [R=301,L] | |
</IfModule> |
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 | |
function my_posts_where( $where ) { | |
$where = str_replace("meta_key = 'dates_$", "meta_key LIKE 'dates_%", $where); | |
return $where; | |
} | |
add_filter('posts_where', 'my_posts_where'); | |
function getRelatedEvents($id,$taxonomies){ | |
$today = date('Ymd'); | |
$tlist=[]; |
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
map.on('zoom', function() { | |
const z=Math.ceil(map.getZoom()); | |
let scale=1; | |
if(z<13){ | |
scale=.45; | |
}else if(z>=13 && z<14){ | |
scale=.6; | |
}else{ | |
scale=1; | |
} |
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 | |
add_action( 'pre_get_posts', 'custom_query_vars' ); | |
function custom_query_vars( $query ) { | |
if ( !is_admin() && $query->is_main_query()) { | |
if ( is_post_type_archive('evenements')) { | |
$today = date('Ymd'); | |
$sixMonthsPast = date('Ymd',strtotime('today -6 months')); | |
$sixMonths = date('Ymd',strtotime('today +6 months')); |
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 | |
function getLazyLoadImg($id,$lb=true,$size='large',$title=false){ | |
$lbOpen=$lbClose=''; | |
$tiny = wp_get_attachment_image_src( $id, 'thumbnail' ); // récup la miniature | |
$largeimg = wp_get_attachment_image_src( $id, $size); // récup la taille souhaité | |
$image_alt = get_post_meta($id, '_wp_attachment_image_alt', TRUE); | |
if(!$largeimg){ // si pas de taille demandé |
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 | |
function my_format_TinyMCE( $in ) { | |
$in['block_formats'] = "Paragraph=p; Heading 3=h3; Heading 4=h4"; | |
$in['toolbar1'] = 'pastetext,bold,blockquote,italic,bullist,numlist,link,wp_adv'; | |
$in['toolbar2'] = 'formatselect,italic,strikethrough,charmap,wp_more,unlink,removeformat,outdent,indent,undo,redo,wp_help'; | |
$in['toolbar3'] = ''; | |
$in['toolbar4'] = ''; | |
return $in; |
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 | |
/* paste at the top of base.php */ | |
global $wp_query; | |
if(isset($wp_query->query_vars['sitemap'])){ | |
$blogs=get_blogs_urls(); | |
NewerOlder