Skip to content

Instantly share code, notes, and snippets.

@SilasOtoko
SilasOtoko / gist:899035edd78dfc28ca2db466873c82ed
Created December 2, 2022 15:08
Google Fonts Enqueue Version Number Bug
Version number caching issue with loading Google Fonts with wp_enqueue_style where updating the link doesn't show on the frontend. Apparently the solution is to null out the version number.
wp_enqueue_style( 'fonts', 'https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=Marcellus&display=swap', array(), null );
Thank goodness for Kristin Falkner writing about this obscure bug:
https://www.kristinfalkner.com/wordpress-google-fonts-fix/
@SilasOtoko
SilasOtoko / stacking-context.md
Last active February 7, 2019 20:33
Z-index, Position: Relative, and Stacking Context
@SilasOtoko
SilasOtoko / browser_bugs_and_fixes.md
Last active January 18, 2019 17:12
Browser Bugs and Fixes

IE

Nested Flexbox element has children that push out of parent. Fix: Add Overflow: Hidden to nested flexbox parent and this will push the elements back inside parent. (Surprisingly doesn't just cut them off.)

@SilasOtoko
SilasOtoko / lazy-loading-youtube-videos.md
Last active June 15, 2018 15:38
How to lazy load YouTube videos on a WordPress website.

#Developer Documentation

##Useful Apps/Extensions I use quite often.

  • 1Password
  • Codekit
  • Transmit
  • MAMP
  • Font Ninja
  • Color Snapper 2
  • Adobe XD
@SilasOtoko
SilasOtoko / live_chat_options.md
Last active March 4, 2016 01:57
Options for live chat plugins for WordPress site.

ClickDesk Live Support

Zopim

More modern company, modern design

  • Pricing
    • Price: $11.20 per agent per month billed anually for Basic
  • Free Option
@SilasOtoko
SilasOtoko / code-snippets.md
Last active July 25, 2018 19:14
Tricks of the Trade
  • To get rid of p tags that WordPress is inserting, add to the header of your template.

  • To fix jittery scrolling on IE, (noticeable with fixed background images) use:

    $('body').on("mousewheel", function () {
        // remove default behavior
        event.preventDefault(); 

        //scroll without smoothing
        var wheelDelta = event.wheelDelta;
@SilasOtoko
SilasOtoko / using_bcrypt.txt
Created September 27, 2015 19:47
Using Bcrypt
Here is a walkthrough
https://gist.github.com/thebucknerlife/10090014
Make sure that when you are creating the user model, you use "password_digest", but when you call it from the project, use "password"