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 more font weights | |
add_filter('et_builder_google_fonts', 'my_custom_google_fonts', 10); | |
function my_custom_google_fonts($google_fonts) { | |
$google_fonts['Montserrat']['styles'] = '300,300i,400,400i,600,600i,700,700i'; | |
return $google_fonts; | |
} |
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_filter( 'wc_shipment_tracking_get_providers', 'custom_shipment_tracking' ); | |
function custom_shipment_tracking( $providers ) { | |
// unset all the ones you don't want (e.g., we kept USPS and FedEx set) | |
unset($providers['Australia']); | |
unset($providers['Austria']); | |
unset($providers['Brazil']); | |
unset($providers['Belgium']); |
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
// if blurb has blurb-click class on the module, then move the module link so it wraps the entire blurb | |
jQuery(function($){ | |
// If a Divi Blurb module has a link around the blurb image or the blurb title, then move the link so it wraps the entire blurb | |
$('.et_pb_blurb.blurb-click').each(function() { | |
var blurb_content = $('.et_pb_blurb_content', this); | |
var blurb_image_link = $('.et_pb_blurb_content .et_pb_main_blurb_image a', this); | |
var blurb_title_link = $('.et_pb_blurb_content .et_pb_blurb_container .et_pb_module_header a', this); | |
// if blurb has an image link and a title link, unwrap both links, and then wrap the image link around the entire content | |
if ( $(blurb_image_link).length && $(blurb_title_link).length ) { | |
blurb_image_link.contents().unwrap(); |
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 | |
// Replaces default display name to login name (username). As soon as the user logs in, the setting gets changed. | |
add_action( 'wp_login', 'fs_format_user_display_name_on_login' ); | |
function fs_format_user_display_name_on_login( $username ) { | |
$user = get_user_by( 'login', $username ); | |
$userdata = array( |
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 | |
/* Custom functions code goes here. */ | |
function my_theme_enqueue_styles() { | |
$parent_style = 'parent-style'; | |
// enqueue the parent theme stylesheet | |
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); |
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
// Category > Action > Label | |
jQuery(document).ready(function() { | |
//Log GA Event for Sidebar MailChimp form submit click | |
jQuery('#mk-sidebar #mc-embedded-subscribe').click(function() { | |
ga('send', 'event', 'Subscribe', 'Click', 'Sidebar'); | |
}); | |
//Log GA Event for Top Bar MailChimp form submit click | |
jQuery('#mailchimp-top-bar .mctb-button').click(function() { | |
ga('send', 'event', 'Subscribe', 'Click', 'Header'); | |
}); |
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 these settings to wp-config.php: | |
define( 'WP_MAX_MEMORY_LIMIT', '512M' ); | |
define( 'WP_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
<?php | |
// if it's not the homepage and they aren't logged in, redirect to the home URL | |
add_action( 'template_redirect', 'fs_maintance_mode' ); | |
function fs_maintance_mode() { | |
if ( !is_home() && !is_user_logged_in() ) { | |
wp_redirect( esc_url_raw( home_url() ) ); | |
exit; | |
} | |
} |
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
(function($) { | |
$( ".website .sb_mod_acf_single_item" ).text(function () { | |
if ( ($(this).text().length >=5) && ($(this).text().substr(0, 5) != 'http:') && ($(this).text().substr(0, 5) != 'https') ) { | |
$(this).replaceWith( '<a href="http://' + $(this).text() + '" target="_blank">' + $(this).text() + '</a>' ); | |
} | |
else { | |
$(this).replaceWith( '<a href="' + $(this).text() + '" target="_blank">' + $(this).text() + '</a>' ); | |
} | |
}); | |
})(jQuery); |
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
set $bar 0; | |
set $becue 0; | |
if ( $request_uri ~* "wp-content/uploads/private" ) { | |
set $bar 1; | |
} | |
if ($http_cookie ~ "wordpress_logged_in") { | |
set $becue 1; | |
} | |
set $barbecue "$bar:$becue"; | |
if ($barbecue = "1:0") { |