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
// modifys contact form 7's default select value of --- to Please select... | |
function my_wpcf7_form_elements($html) { | |
$text = 'Please select...'; | |
$html = str_replace('<option value="">---</option>', '<option value="">' . $text . '</option>', $html); | |
return $html; | |
} | |
add_filter('wpcf7_form_elements', 'my_wpcf7_form_elements'); | |
// Modify multiple selects - Target each one specifically | |
function my_wpcf7_form_elements($html) { |
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 echo paginate_links( $args ); ?> | |
<!--OR--> | |
<?php | |
//custom paginaiton with styling from bootstrap | |
function custom_pagination() { | |
global $wp_query; | |
$big = 999999999; // need an unlikely integer | |
$pages = paginate_links( array( | |
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
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
$(document).ready(function () { | |
$(window).resize(responsive); | |
$(window).trigger('resize'); | |
}); | |
function responsive () { | |
// get resolution |
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 echo '<!-- ' . basename( get_page_template() ) . ' -->'; ?> |
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
if (file_exists(dirname(__FILE__) . '/local.php')) { | |
// Local Environment | |
define('WP_ENV', 'development'); | |
//define('WP_DEBUG', true); | |
// ** MySQL settings - You can get this info from your web host ** // | |
/** The name of the database for WordPress */ | |
define('DB_NAME', 'name'); |
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
function my_admin_notice() { | |
?> | |
<div class="error"> | |
<p><?php _e( '3/13/2013 - ATTENTION! Please do not update the Custom Post Type UI Plugin. Versions 1.0.4. and lower are causing issues with content disappearing. Version 0.9.5 is stable and should remain active until futher notice. Please contact support with any questions.', 'my-text-domain' ); ?></p> | |
</div> | |
<?php | |
} | |
add_action( 'admin_notices', 'my_admin_notice' ); |
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 global $blog_id; ?> | |
<?php if ($blog_id == 2) { ?> | |
<?php } elseif ($blog_id == 1) { ?> | |
<?php } ?> | |
// Add site-id class to body functions.php | |
add_filter('body_class', 'multisite_body_classes'); | |
function multisite_body_classes($classes) { | |
$id = get_current_blog_id(); |
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
//Smooth scroll to member info #details | |
$('a[href*=#jump]').click(function() { | |
if (location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && location.hostname === this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); | |
if (target.length) { | |
$('html,body').animate({ | |
scrollTop: target.offset().top | |
}, 1000); | |
return false; |
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
AuthType Basic | |
AuthName "Password Protected Area" | |
AuthUserFile /your/server/path/.htpasswd | |
Require valid-user |
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
//Backorder | |
function backordertext($available) { | |
foreach ($available as $i) { | |
$available = strreplace('Available on backorder', 'This item is currently only available for backorder. Please allow 30-45 days from time of order for delivery.', $available); | |
} | |
return $available; | |
} | |
addfilter('woocommercegetavailability', 'backordertext'); |