By default Shopify points to the /accounts page when Customers login. This function will redirect them to a page of your choice.
Read MoreIn the attached example, an each function is used to equalize the heights of the containers based on the width of the columns so the images will show in equal size.
This allows for the same type of element to be setup multiple ways without additional classes / css.
Read MorePreviously examples of this that I’ve found and used don’t always seem to work. I found an updated version that works well.
Read MoreWorked on a subscription service website recently that had specific weekly cutoffs for ordering in order to have ordering available for the following week.
Read MoreIn the past I’ve manually changed the content of the jquery file (I know, bad bad bad), or used a plugin to make this editable for me (also, bad bad bad). This snippet helps avoid those two methods and lets the edit occur within your theme.
Read MoreA fixed header can cause auto-scroll content to be covered. Use this function to offset the scroll to the height of the fixed container.
Read MoreIdeal for working with plugins where the fields are not available for editing / customization.
Read MoreI’ve been working with a few plugins lately that have templates, but do not allow for editing for the loop, so I’ve been unable to add counters with PHP.
Read MoreAutosort data on a page from a hash URL using the following snippet and related HTML.
Read MoreWorking with fixed headers and absolute-positioned drop-down menus can be difficult to adjust with CSS alone.
Read MoreWhen adding content, sometimes it’s necessary to add in extra non-breaking spaces to adjust spacing on desktop. Even some plugins (Shortcodes Ultimate) will create additional paragraph tags in the content area that cannot be removed from the editor.
Read MoreSlick Slider has pause and play functions available, but they are not easily enabled.
Read MoreiOS devices when programmed to use “hover” with css will often ignore this effect in handheld and touchscreen devices, forcing the user to double-click in order to reveal toggled or hidden content.
Read MoreSimple jQuery function to toggle between multiple containers on click.Filter links HTML:
Read MoreSlick Slider is a great plugin for creating custom carousels on websites. It has a built in navigation option for the carousel as well: asNavFor.
Read MoreThere is probably a simpler way to do this, but so far this method works for me …
Read MoreComes in handy if you’re adding links to multiple external sources or components, such as locations, company websites, or PDFs.
Read MoreThis example works great with Isotope, Masonry, and jQuery filters.
Read MoreIt’s unfortunate that the Time Field in Gravity Forms does not have more custom options available.
Contrarily, the Date Field, allows for a calendar icon, and drop downs, but the Time Field doesn’t have a default placeholder option to populate the current time, or an alternate view to allow for drop downs showing 12 or 24 hour time.
So I had to turn to jQuery…
Read MoreI’ve been running into “Uncaught referenceError: jQuery is not defined” a lot lately when working with scripts and plugins that I’ve used for years. It’s unbelievably annoying to have something that’s worked one way for most of my career to suddenly stop working and bring up errors.
Nonetheless, I’ve found a solution!
Read MoreUse the following snippet to identify the tallest div in the sequence and force all the same level divs to match height with it.
Read MoreI hate anchor tags, and I hate even more that there isn’t an easy point / click way for them to be added into a website using the WordPress editor.
Nonetheless, clients request them a lot, and they don’t like the “jumping” that they cause when the anchor links are on the same page.
Read MoreIf your design is in a tiled layout, or you have a series of blog entries in rows and would like to show the “Read More” buttons below the lead-in text at the same height, this is a pretty straight-forward fix.
Read MoreCreate a custom Instagram slider for your site using jSON and the following instructions…
Read MoreAnother way to style images dynamically based on window sizes is shown below.
If you’re using images that are set to a 2:1 ratio (where width is two times greater than the height), you can use the example below to dynamically scale the height of the containers as windows are loaded / resized.
Read MoreUsing tiled image layouts in responsive design can sometimes be tricky to set the height, especially if you want all of the image containers to consistently remain the same height.
Read MoreCheck all values of a div, by class name, and return only values matching the search criteria. Below is an example where this search filter is applied to a staff directory.
Read MoreSuper simple jQuery data filter, that can easily be made dynamic using a query like so:
Read MoreThis is a continued modification of my earlier post for toggling multiple embedded YouTube videos into a larger playing div.
Since I was already using Posts to embed the videos, enabling a Featured Image for a Poster, and using the Content editor for a text overlay was a simple feat to accomplish.
Read MoreCreate your own media page from posts with embedded YouTube videos, and toggle the list of videos into a larger div to play the content using the steps below.
Read MoreUsing buttons and jQuery to filter and sort Posts on a website can be fun! Unfortunately, as your content grows, it can also become space consuming, and difficult to read.
Convert a list to a dropdown, and toggle the display of the items via class with a jQuery function.
Read MoreWhen the order of elements in your desktop layout differs from the order of items in your mobile layout, it might be prudent to load items based on the screen size using a jQuery if statement.
Read MoreA simple alternative to using HTML5 audio controls. Link directly to an audio file in the page, or use this method within a loop.
Read MoreCan bet setup to occur automatically onload. If there is a large menu section that you’d like visitors to scroll past on subpages.
Read MoreToggle text back and forth from a selected phrase using this function
Read MoreI used this with my Fake Archives for Multiple Authors in order to hide the child containers.
Read MoreCreate a simple background parallax with the following instructions.
Read MoreComes in handy when working with older devices.
Read MoreI recently needed to create a dynamic table for a visual aesthetic. A few background images had been strategically placed alongside the content, and the grid provided structure and flow. Using this bit of code, I was able to target a div to populate an empty table, and style it accordingly.
Read MoreEmbedded fonts that are being loaded from a server / another website, or file, will sometimes load after the main css file, and after the page is loaded, resulting in a weird display. Typekit fonts can be loaded faster using a timeout script.
Read MoreWhen Themes are upgraded in Shopify, script libraries are upgraded. Depending on the level of expertise of the individual that developed your Theme, this means errors can arise. If your mobile navigation stops working, you may need to find your scripts.js.liquid file and look for errors in syntax and coding. Check your console to be sure which file you should edit, and always make a back up!
Read MoreWhen working with background images, parallax websites, or full width and height sliders, you might find the need to have a div adjust to be the full width or height of the viewport automagically. This code will help you find your way. Sourced from the comments on css-tricks.com
Read MoreWorking with Shopify, I found this bit of code, and was able to setup auto-switching full screen background images. You can use this to setup multiple background images that will change over automagically on page load.
Read More