- Remove obsolete content, e.g. Hello World
- Remove obsolete plugins, e.g. Hello Dolly
- Replace all placeholder texts, e.g. Lorem Ipsum
- Replace all placeholder images, e.g. placeholder.png
- Find and remove all broken links, e.g. with Broken Link Checker
- Create 404 page
- Create contact page
- Create legal pages, e.g. Terms and conditions and Privacy Policy
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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
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 | |
switch ($_SERVER['HTTP_HOST']) { | |
case 'dev.mydomain.com': | |
define('DB_NAME', '' ); | |
define('DB_USER', '' ); | |
define('DB_PASSWORD', '' ); | |
define('DB_HOST', '127.0.0.1' ); | |
define('WP_CACHE', false); | |
define('WP_DEBUG', 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
<?php | |
//* Hide admin bar | |
add_filter('show_admin_bar', '__return_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
<?php | |
//* Get global WC object | |
global $woocommerce; | |
//* Access various WooCommerce cart variables, see also https://docs.woothemes.com/wc-apidocs/class-WC_Cart.html | |
$woocommerce->cart->get_cart_subtotal(); | |
$woocommerce->cart->get_cart_tax(); | |
$woocommerce->cart->get_cart_total(); | |
//* Access various WooCommerce customer variables, see also @see https://docs.woothemes.com/wc-apidocs/class-WC_Customer.html |
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 | |
//* Enhance customizer | |
add_action( 'customize_register', 'nl_enhance_customizer' ); | |
function nl_enhance_customizer( $wp_customize ) { | |
$wp_customize->add_section( | |
'footer_section', | |
array( | |
'title' => __('Title of the settings box', 'theme_name'), | |
'description' => __('Description of the settings box'), | |
'priority' => 150, |
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 taxomonies to page | |
add_action( 'init', 'nl_add_taxonomies_to_pages' ); | |
function nl_add_taxonomies_to_pages() { | |
register_taxonomy_for_object_type( 'post_tag', 'page' ); | |
register_taxonomy_for_object_type( 'category', 'page' ); | |
} |
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 | |
//* Forward all WC email notifications | |
add_filter( 'woocommerce_email_headers', 'nl_forward_wc_email_notifocations', 10, 2); | |
function nl_forward_wc_email_notifocations($headers, $object) { | |
$headers = array(); | |
$headers[] = 'Bcc: Niels Lange <[email protected]>'; | |
$headers[] = 'Content-Type: text/html'; | |
return $headers; | |
} |
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 | |
//* Hide all login errors | |
add_filter( 'login_errors', 'nl_hide_login_errors' ); | |
function nl_hide_login_errors(){ | |
return null; | |
} |
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
# Enable .htpasswd authentication | |
# <If "%{HTTP_HOST} != 'dev'"> | |
# AuthType Basic | |
# AuthName "Login to dashboard" | |
# AuthUserFile /path/to/.htpasswd | |
# Require valid-user | |
# </If> | |
# Deny access to all .htaccess files | |
<files ~ "^.*\.([Hh][Tt][Aa])"> |
OlderNewer