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.
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.
| //Change HubSpot Blog Excerpt Length WITHOUT using the "more tag" feature. | |
| {{ content.post_list_content|safe|truncatehtml(300, '...' , false) }} |
| <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; | |
| } |
| <?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>'; |
| //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> |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| /*-----------------------------------------------------------------------------------*/ | |
| /* 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.'; |
| /*-----------------------------------------------------------------------------------*/ | |
| /* 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; |