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
#WP block - see https://fr.wordpress.org/support/article/htaccess/ | |
RewriteEngine On | |
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
# ajouter un slash après /wp-admin | |
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} -f [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
<?php | |
/** | |
* @param WP_Query|null $wp_query | |
* @param bool $echo | |
* @param array $params | |
* | |
* @return string|null | |
* | |
* Using Bootstrap 4? see https://gist.github.com/mtx-z/f95af6cc6fb562eb1a1540ca715ed928 | |
* |
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 | |
/** | |
* Inspired from: https://gist.github.com/dazecoop/548b2621e86fb030da8e5adb1bfe484f | |
* | |
* How to use: | |
* - add to your function.php or related | |
* | |
* What you can use it for: | |
* Variable products: | |
* - you have variable product with some attributes not used for variations |
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 | |
/** | |
* Edit checkout form inputs | |
* source: https://gist.github.com/nickkuijpers/5d07ecf9b0a0678b4f4c | |
*/ | |
add_filter('woocommerce_checkout_fields', 'addBootstrapToCheckoutFields' ); | |
/** | |
* @param $fields | |
* @return mixed | |
*/ |
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 | |
/** | |
* Edit default Woocommerce product loop thumbnail template | |
* As there is no dedicated Woocommerce template (eg wp-content/plugins/woocommerce/templates/loop/price.php) | |
* because it's generated using filter, we must remove Woocommerce hook, and add our own "at the same place" | |
* to edit the product loop thumbnail template | |
* tested up to | |
* 14/07/2023 : | |
* Woocommerce 6.2.2 | |
* 12/10/2020 : |
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
# Remove index.php$ | |
if ($request_uri ~* "^(.*/)index\.php$") { | |
return 301 $1; | |
} | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
# Remove from everywhere index.php | |
if ($request_uri ~* "^(.*/)index\.php(/?)(.*)") { |
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
/** | |
* ACF save json folder | |
*/ | |
add_filter( 'acf/settings/save_json', 'my_acf_json_save_point' ); | |
function my_acf_json_save_point( $path ) { | |
return get_stylesheet_directory() . '/acf-json-custom-folder'; | |
} | |
/** |
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 | |
/** | |
* Various removers | |
* todo: all may not be still needed/usefull/correct | |
*/ | |
/** | |
* @param $headers | |
* |
NewerOlder