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.
/*-----------------------------------------------------------------------------------*/ | |
/* 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; |
/*-----------------------------------------------------------------------------------*/ | |
/* WooCommerce - Change Checkout Notes Label and Place Holder Text | |
/*-----------------------------------------------------------------------------------*/ | |
// Hook in | |
add_filter( 'woocommerce_checkout_fields' , 'theme_override_checkout_notes_fields' ); | |
// Our hooked in function - $fields is passed via the filter! | |
function theme_override_checkout_notes_fields( $fields ) { | |
$fields['order']['order_comments']['placeholder'] = 'Add some order notes or a gift message here.'; |
// 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> |
<?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>'; |
<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; | |
} |
//Change HubSpot Blog Excerpt Length WITHOUT using the "more tag" feature. | |
{{ content.post_list_content|safe|truncatehtml(300, '...' , false) }} |
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.
//For this to work you need to change the body tag to look like this: | |
//<body <?php body_class() ?>> | |
function add_body_classes( $classes ) { | |
// Adds a class if post type is books | |
if ( is_singular('book') ) { | |
$classes[] = 'book-single'; | |
} | |
// add class if not home page | |
if ( ! is_home() ) { |
// 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' ), |