I ended up building a funky bottom-fixed nav which had a full-width submenu. This example includes the "slide-up" CSS3 animation as well as the inclusion of the HoverIntent plugin.
A Pen by Joshua P. Larson on CodePen.
| <?php | |
| /** | |
| * Programmatically alter the WooCommerce cart discount total (and apply a new discount) before it's calculated | |
| * through the woocommerce_calculate_totals hook. | |
| * | |
| * For example, if you want to apply an arbitrary discount after a certain number of products in the cart, | |
| * you can loop through that number and increment it as needed. | |
| * | |
| * In this example, I increment the discount by $8.85 after every 15 products added to the cart. | |
| * |
| /* | |
| * jQuery pageSlide | |
| * Version 2.0 | |
| * EDITED BY @jplhomer to enable the toggling of the menu by touching the main content area. | |
| * http://srobbin.com/jquery-pageslide/ | |
| * | |
| * jQuery Javascript plugin which slides a webpage over to reveal an additional interaction pane. | |
| * | |
| * Copyright (c) 2011 Scott Robbin (srobbin.com) | |
| * Dual licensed under the MIT and GPL licenses. |
| <?php if ( $events = get_field( 'events' ) ) : | |
| // Re-order our events just in case | |
| if ( get_field('sort_order') == 'Date Descending') { | |
| usort( $events, 'sort_by_date_descending'); | |
| } else { | |
| usort( $events, 'sort_by_date_ascending'); | |
| } | |
| // Set a year checker to see if we should print a new year | |
| $year = 0; |
| /* | |
| * This is a NodeJS app using the official MailChimp API wrapper. | |
| * I want to grab this data and display it in a custom view, but without a giant callback-y mess. Ideas? | |
| */ | |
| exports.view = function(req, res){ | |
| mc.campaigns.list({campaign_id: req.params.id}, function(campaignData) { | |
| var campaign = campaignData.data[0]; | |
| mc.reports.summary({cid:req.params.id}, function(reportData) { | |
| mc.lists.list({ list_id: campaignData.list_id }, function(listData) { |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| $ wp post list --format=ids | xargs wp post update --comment_status=closed | |
| # Output: | |
| # Success: Updated post 2514. | |
| # Success: Updated post 2511. | |
| # Success: Updated post 2504. | |
| # Success: Updated post 2499. | |
| # Success: Updated post 2441. | |
| # etc... |
| <!-- Our font file is fonts.css --> | |
| <script> | |
| /*! | |
| loadCSS: load a CSS file asynchronously. | |
| [c]2014 @scottjehl, Filament Group, Inc. | |
| Licensed MIT | |
| */ | |
| /* exported loadCSS */ |
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| // single.php or whatever template you'd like | |
| // 1. Get the ID of the current thumbnail for the post | |
| $attachment_id = get_post_thumbnail_id(); | |
| // 2. Get the tags associated to the image | |
| $tags = wp_get_post_terms($attachment_id, 'tmt_tag'); |