Two column blog card style layouts with hover effects. Card layout has an option with and without icons.
A Pen by Jeff Aspen on CodePen.
<?php | |
/** | |
* Add checkbox field to the checkout | |
**/ | |
add_action('woocommerce_after_order_notes', 'my_custom_checkout_field'); | |
function my_custom_checkout_field( $checkout ) { | |
echo '<div id="my-new-field"><h3>'.__('My Checkbox: ').'</h3>'; |
/*-----------------------------------------------------------------------------------*/ | |
/* WooCommerce - Change Order Notes Placeholder Text | |
/*-----------------------------------------------------------------------------------*/ | |
add_filter( 'woocommerce_checkout_fields', 'theme_woocommerce_checkout_fields' ); | |
function theme_woocommerce_checkout_fields( $fields ) { | |
$fields['order']['order_comments']['placeholder'] = 'Add your custom message here'; | |
return $fields; |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
//the next few lines strip "or Create an Account" from the log-in menu option | |
//I usually set the overall navigation to display:none; in my CSS if I know js is enabled | |
//I use Modernizr and check for the js class on the <html> tag with the style selector for my menu | |
//like: .js #navigation { display: none; } | |
//You'll want to add a class or ID to the <div> containing the log-in/log-out link | |
//usual output (with added ID): | |
//<li> | |
// <div id="log_in_options"> | |
// <a onclick="" href="[url]">Sign in</a> or <a onclick="" href="[url]">Create an account</a> |
<div class="hover_effect"> | |
<img src="PATH-TO-FIRST-IMAGE" class="first"> | |
<img src="PATH-TO-SECOND-IMAGE" class="second> | |
</div> | |
<style type="text/css" media="screen"> | |
.hover_effect .second { | |
display: none; | |
} |
Two column blog card style layouts with hover effects. Card layout has an option with and without icons.
A Pen by Jeff Aspen on CodePen.
// Register Custom Post Type | |
function cmms_testimonial_post_type() { | |
$labels = array( | |
'name' => _x( 'Testimonials', 'Post Type General Name', 'cmms' ), | |
'singular_name' => _x( 'Testimonial', 'Post Type Singular Name', 'cmms' ), | |
'menu_name' => __( 'Testimonials', 'cmms' ), | |
'name_admin_bar' => __( 'Testimonial', 'cmms' ), | |
'archives' => __( 'Item Archives', 'cmms' ), | |
'parent_item_colon' => __( 'Parent Item:', 'cmms' ), |
//Change HubSpot Blog Excerpt Length WITHOUT using the "more tag" feature. | |
{{ content.post_list_content|safe|truncatehtml(300, '...' , false) }} |
/* | |
* https://ben.lobaugh.net/blog/202432/prevent-wordpress-plugins-from-requesting-updates | |
* Be sure to change [plugin_folder]/[plugin_file].php to the plugin you want to prevent updating. | |
*/ | |
add_filter( 'site_transient_update_plugins', array( 'no_updates_for_you' ) ); | |
function no_updates_for_you( $value ) { |
/** | |
* Spacer | |
* | |
* @since 1.3.0 | |
* Use the shortcode: [spacer class="css-class-name" height="30px"] | |
* Note: Since the space size uses an inline style your css class may have to use an !important | |
*/ | |
function cmms_spacer_shortcode( $atts ) { | |
// Attributes |