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
// Add Pinterest Javascript to your website, see https://gist.github.com/Willem-Siebe/11351787. | |
function wsis_add_pinterest_script() { | |
?> | |
<script type="text/javascript"> | |
(function(d){ | |
var f = d.getElementsByTagName('SCRIPT')[0], p = d.createElement('SCRIPT'); | |
p.type = 'text/javascript'; | |
p.async = true; | |
p.setAttribute('data-pin-hover', true); |
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
# The ideal Robots.txt for your WordPress website, see https://gist.github.com/Willem-Siebe/11368429. | |
User-Agent: * | |
Disallow: /wp-content/plugins/ |
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
// Don't load the WPML Language selector CSS, see https://gist.github.com/Willem-Siebe/751d2a2a9cedf6036256. | |
define('ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS', true); |
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
/** Increase PHP Memory, see https://gist.github.com/Willem-Siebe/8a7d17c5f82859129f32. | |
* | |
* Please note, this has to be put before wp-settings.php inclusion. | |
*/ | |
define( 'WP_MEMORY_LIMIT', '128M' ); | |
// Administration tasks require much memory than usual operation. When in the administration area, the memory can be increased or decreased from the WP_MEMORY_LIMIT by defining WP_MAX_MEMORY_LIMIT. | |
define( 'WP_MAX_MEMORY_LIMIT', '512M' ); |
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 WooCommerce breadcrumbs, see https://gist.github.com/Willem-Siebe/65d59638d503682fa67a. | |
remove_action( 'woocommerce_before_main_content','woocommerce_breadcrumb', 20, 0); |
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 Shop page from WooCommerce breadcrumb on is_product page, see https://gist.github.com/Willem-Siebe/6f43704e8536fc308fc3. | |
function wsis_wpseo_breadcrumb_output( $output ){ | |
if( is_product() ){ | |
$from = ' » <span typeof="v:Breadcrumb"><a href="http://yoururl.com/shop/" rel="v:url" property="v:title">Producten</a></span>'; | |
$to = ''; | |
$output = str_replace( $from, $to, $output ); |
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
// Translate Date format multilingual website using WPML, see https://gist.github.com/Willem-Siebe/5eb063c04dda7b6863e8. | |
/** | |
* WPML and Toolset Support Team. | |
* Register date_format option in string translations. | |
* | |
* @param string $format Initial format stored in database. | |
* | |
* @return string Translated format. | |
*/ |
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
// WooCommerce theme integration, see https://gist.github.com/Willem-Siebe/9cd10326c07f5e3e8076. | |
/** | |
* woocommerce_before_main_content hook | |
* | |
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) | |
* @hooked woocommerce_breadcrumb - 20 | |
*/ | |
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 ); |
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
add_filter( 'woocommerce_billing_fields', 'custom_woocommerce_billing_fields' ); | |
function custom_woocommerce_billing_fields( $fields ) { | |
// Over-ride a single label | |
$fields['billing_first_name']['label'] = 'Your label'; | |
// Over-ride a single required value | |
$fields['billing_first_name']['required'] = false; |
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
<!-- Add Order number besides invoicenumber to invoice (WooCommerce PDF Invoices & Packing Slips plugin), see https://gist.github.com/Willem-Siebe/c05bd7d2938e951b54bc --> | |
<span class="order-number-label"><?php _e( 'Order Number:', 'wpo_wcpdf' ); ?></span> | |
<span class="order-number"><?php $wpo_wcpdf->order_number(); ?></span><br /> |
OlderNewer