This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<meta name="robots" content="noodp, noydir" /> | |
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com"> | |
<link rel="canonical" href="http://mysite.com/" /> | |
<link rel="stylesheet" href="http://mysite.com/style.css" type="text/css" /> |
This file contains hidden or 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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Bootstrap Masonry Template</title> | |
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="style.css"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans+Caption:400,700"> |
This file contains hidden or 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 if (($wp_query->current_post +1) == ($wp_query->post_count)) { | |
echo 'This is the last post'; | |
} ?> | |
<?php if (($wp_query->current_post +1) != ($wp_query->post_count)) { | |
echo 'This is the not the last post'; | |
} ?> |
This file contains hidden or 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
/** | |
* Deactivate Flat Rate Shipping if products with specific shipping | |
* classes are in the cart | |
* | |
* Add the shipping class slugs to the $shippingclass_array array | |
*/ | |
add_filter( 'woocommerce_shipping_flat_rate_is_available', 'unset_woocommerce_shipping_methods_flat_rate', 10 ,2 ); | |
function unset_woocommerce_shipping_methods_flat_rate ( $return, $package ) { | |
// Setup an array of shipping classes that do not allow Flat Rate Shipping |
This file contains hidden or 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_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' ); | |
add_action( 'woocommerce_before_cart' , 'wc_minimum_order_amount' ); | |
function wc_minimum_order_amount() { | |
// Set this variable to specify a minimum order value | |
$minimum = 50; | |
if ( WC()->cart->total < $minimum ) { | |
if( is_cart() ) { |
This file contains hidden or 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
/** | |
* Set maximum shipping cost in WooCommerce | |
*/ | |
add_filter( 'woocommerce_package_rates' , 'woocommerce_set_maximum_shipping_cost', 10, 2 ); | |
function woocommerce_set_maximum_shipping_cost( $rates, $package ) { | |
foreach( $rates as $rate ) { | |
// Change 10 to your maximum shipping cost | |
if( $rate->cost > 10 ) { | |
$rate->cost = 10; |
This file contains hidden or 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
/** | |
* Check the cart for specific products, remove Free Shipping method if they are present | |
* | |
* Add the code to your theme functions.php file | |
*/ | |
add_filter( 'woocommerce_package_rates', 'unset_free_shipping_method' , 10, 2 ); | |
function unset_free_shipping_method( $rates, $package ) { | |
/** | |
* Setup an array or products |
This file contains hidden or 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
{source 0} | |
<?php | |
function getCarouselContentByLayout($layout, $title = '', $text = '', $count = 0) | |
{ | |
if($layout == 'mobile') { | |
return '<div class="carousel-caption carousel-caption-mobile">' | |
. '<strong>' . $title . '</strong>' | |
. '<p><a href="#myModal-' . $count .'" data-toggle="modal">lees meer</a></p>' | |
. '</div>'; | |
} |
This file contains hidden or 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_action( 'woocommerce_check_cart_items', 'wc_minimum_order_amount' ); | |
function wc_minimum_order_amount() { | |
// Set this variable to specify a minimum order value | |
$minimum = 50; | |
if ( WC()->cart->total < $minimum ) { | |
WC()->add_error( sprintf( 'You must have an order with a minimum of %s to place your order, your current order total is %s.' , | |
woocommerce_price( $minimum ), |
This file contains hidden or 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
<IfModule mod_headers.c> | |
Header set Connection keep-alive | |
# Cache-control headers | |
# 2 HOURS | |
#<filesMatch "*"> | |
Header set Cache-Control "max-age=7200, must-revalidate" | |
#</filesMatch> | |
# 480 weeks - 290304000 |