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
# FORCE https | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
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 and remove body_class() classes | |
*/ | |
function mica_body_class($classes) { | |
// Add post/page slug if not present | |
if (is_single() || is_page() && !is_front_page()) { | |
if (!in_array(basename(get_permalink()), $classes)) { | |
$classes[] = basename(get_permalink()); | |
} |
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 | |
/** | |
* Analyse a string , grab Bandcamp links and replace them by embed player | |
* You may change the html code of the player in buildEmbed method | |
* | |
* @author Michael CAILLET <a href="https://mi-ca.ch">mi-ca.ch</a> | |
* @version 1.0 | |
* @uses $bc=new BandCampEmbed($string); | |
* echo $bc->getEmbededText(); | |
* // OR |
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 | |
/** | |
* Disable routes | |
*/ | |
/** | |
* disable useless routes | |
* prevent user to call routes that you don't skin ;) | |
* comment the lines you skin // | |
*/ | |
function disable_useless_routes() { |
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_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=[]; |
NewerOlder