Skip to content

Instantly share code, notes, and snippets.

Avatar

Aaron Snowberger jekkilekki

View GitHub Profile
@jekkilekki
jekkilekki / README.md
Last active May 26, 2020
New Website (WordPress) Helpers
View README.md

New Website (WordPress) Helpers

These website building helpers are originally extracted from the WordPress TwentyTwenty Theme and are intended to provide easy access to some of the most common basic styles for a website.

This Gist will be occasionally updated with my own preferences for these styles. Files include the following:

File Purpose
HTML
@jekkilekki
jekkilekki / wp-social-menu.md
Created Sep 22, 2015
Social Menu Code from Justin Tadlock
View wp-social-menu.md

Register Social menu in functions.php

register_nav_menus( array(
    'top'     => esc_html__( 'Top Menu', 'theme-slug' ),
    'social'  => esc_html__( 'Social Menu', 'theme-slug' ),
) );

Create menu in inc/template-tags.php

@jekkilekki
jekkilekki / slide-in-images.css
Created Jan 10, 2017
Slide in as you scroll down boxes
View slide-in-images.css
/**
* Sliding Image Panels
*/
.slide-panel:not(first-child) {
border-top: 1px solid #ddd;
}
.slide-panel .entry-header {
width: 58%;
}
.slide-panel .entry-content {
@jekkilekki
jekkilekki / git-all-branches.sh
Created Oct 21, 2016
Clone ALL branches of a git repo
View git-all-branches.sh
# From Ray Villalobos' course on AngularJS2
# @link https://www.lynda.com/AngularJS-tutorials/Using-exercises-course/428058/482931-4.html
git clone --bare https://github.com/path/to/repo.git .git # Clones a bare version of the repo
git config --bool core.bare false # Switch bare repo to normal version of the repo
git reset --hard # Repo resets to the master branch at the latest commit
@jekkilekki
jekkilekki / Fix Vagrant nginx errors.md
Last active Nov 13, 2017
Vagrant Nginx binding error fix
View Fix Vagrant nginx errors.md

I was the following problems with my VVV installation earlier this year. The following are the steps I took to fix things:

Update to PHP7

Since November PHP7 is the default for VVV, but at that time (Sept/Oct), it was not. But it was included on the [develop] branch (not [master]) of VVV.

  1. Switch to [develop] : git checkout develop
  2. git pull

nginx not binding to port 80

@jekkilekki
jekkilekki / backtotop-button-in-wp.md
Last active Jul 27, 2017
Make a Back to Top button in WordPress
View backtotop-button-in-wp.md
@link https://premium.wpmudev.org/blog/back-to-top-button-wordpress/
@jekkilekki
jekkilekki / taxonomy-dropdowns.js
Created Nov 21, 2016
WordPress taxonomy dropdowns - if too long (default is to show all taxonomies)
View taxonomy-dropdowns.js
jQuery(document).ready(function($) {
/*
* For Taxonomy dropdowns in Post meta
*/
$( '.cat-links .jkl-tax-switch, .tags-links .jkl-tax-switch' ).click( function( e ) {
e.preventDefault();
if( $( this ).next( 'ul' ).hasClass( 'childopen' ) ) {
$( this ).next( 'ul' ).removeClass( 'childopen' );
} else {
@jekkilekki
jekkilekki / customizer-pseudo-elements.js
Last active Feb 6, 2017
Use a Background Gradient in WP Customizer + Various other Customizer functions
View customizer-pseudo-elements.js
/**
* Make the WP Customizer also recognize and adjust pseudo- elements like :before and :hover
* Non-instantaneous update - requires partial page refresh
*/
// Highlight colors
wp.customize( 'highlight_color', function( value ) {
value.bind( function( to ) {
$( 'a:visited, a:hover, a:focus, a:active, .entry-content a, .entry-summary a' ).css( {
@jekkilekki
jekkilekki / lifeData.csv
Last active Jan 25, 2017
Data for D3.js Radar Chart
View lifeData.csv
section twenty14 twenty15 twenty16
Physical 3 4 6
Mental 5 4 6
Spiritual 4 3 2
Career 2 5 6.5
Financial 4 2 7
Family 5 6 4
Relationships 3 5.5 5
Lifestyle 4 5 3
@jekkilekki
jekkilekki / _.md
Last active Jan 19, 2017
D3 Pie Chart
View _.md
You can’t perform that action at this time.