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
/** | |
* Change the default country on the checkout page | |
*/ | |
add_filter( 'default_checkout_billing_country', 'change_default_checkout_country' ); | |
function change_default_checkout_country() { | |
return 'US'; // Put Country code here | |
} |
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
/** | |
* Change the default state on the checkout page | |
*/ | |
add_filter( 'default_checkout_billing_country', 'change_default_checkout_country' ); | |
add_filter( 'default_checkout_billing_state', 'change_default_checkout_state' ); | |
function change_default_checkout_state() { | |
return 'XX'; // state code | |
} |
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( ‘image_send_to_editor’, ‘force_protocol_relative’, 10, 9 ); | |
function force_protocol_relative($content) { | |
$content = str_replace( ‘http://’, ‘https://’, $content ); | |
return $content; | |
} |
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 Product Gallery | |
remove_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 ); |
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
/** | |
* Show all Portfolio CPT items on archive | |
* | |
*/ | |
add_action( 'pre_get_posts', 'spigot_show_all_work' ); | |
function spigot_show_all_work( $query ) { | |
if ( ! is_admin() && $query->is_main_query() ) { |
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
INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`) | |
VALUES ('newuserid', MD5('pass123'), 'First Name Last Name', 'email@email.com', '0'); | |
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) | |
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); | |
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) | |
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_user_level', '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
<section id="team" class="team pad-section narrow"> | |
<h1 class="section-title"><?php the_field('t_title'); ?></h1> | |
<div class="contain"> | |
<?php $tImage = get_field('t_image'); ?> | |
<?php echo wp_get_attachment_image($tImage, 'full'); ?> |
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 @header( 'HTTP/1.1 404 Not found', true, 404 ); | |
get_header(); // Loads the header.php template. ?> | |
<main class="content" itemprop="mainContentOfPage"> | |
<header class="page-header"> | |
<h1 <?php hybrid_attr( 'entry-title' ); ?>><?php _e( '404 Error: Page Not Found', 'windsorone' ); ?></h1> |
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 | |
/** | |
* Template Name: Dealer Locator | |
* | |
* This is the template used for displaying the home page. | |
* | |
* @package windsorone | |
* @subpackage Template | |
*/ |
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
# Gzip compression | |
<IfModule mod_deflate.c> | |
# Active compression | |
SetOutputFilter DEFLATE | |
# Force deflate for mangled headers | |
<IfModule mod_setenvif.c> | |
<IfModule mod_headers.c> | |
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding | |
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding | |
# Don’t compress images and other uncompressible content |