Skip to content

Instantly share code, notes, and snippets.

Aaron Snowberger jekkilekki

Block or report user

Report or block jekkilekki

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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 / 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 / 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 / custom-wp-hooks.php
Created Oct 16, 2016
Create custom Action and Filter hooks for your plugins in WordPress
View custom-wp-hooks.php
<?php
/**
* Learn how to create custom Action and Filter hooks.
*
* @link https://www.lynda.com/PHP-tutorials/Creating-custom-hooks/508212/547129-4.html
*/
/**
* 1. Custom FILTER Hook ------------------------------
*/
@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 / clearfix.css
Created Nov 30, 2015
Collection of Quick CSS Gists
View clearfix.css
/* Courtesy of CSS Tricks: https://css-tricks.com/snippets/css/clear-fix/ */
.group:after {
content: "";
display: table;
clear: both;
}
@jekkilekki
jekkilekki / jetpack-likes-fix.md
Last active Nov 13, 2015
Fix the WP Jetpack Likes text on Pages
View jetpack-likes-fix.md

With Jetack "Likes" turned on, when logged in, in the wpadminbar, the "Like" button text doesn't line up:

Like text out of line

To fix it, add: line-height: inherit;

To: #wpadminbar .quicklinks li#wp-admin-bar-wpl-like > a { ... }

@jekkilekki
jekkilekki / wp-walker-menu.php
Last active Nov 5, 2016
Create a Custom Menu Walker for a WordPress Menu
View wp-walker-menu.php
<?php
/**
* Add this code to your functions.php file
* @link https://codex.wordpress.org/Function_Reference/wp_nav_menu#Using_a_custom_Walker_class
*/
class themeslug_walker_nav_menu extends Walker_Nav_Menu {
// add classes to ul sub-menus
function start_lvl( &$output, $depth = 0, $args = array() ) {
@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 / dynamic-copyright-WP.md
Last active Jan 28, 2016
Creating a Dynamic Copyright in WordPress
View dynamic-copyright-WP.md
You can’t perform that action at this time.