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
View markdown-cs.md
@jekkilekki
jekkilekki / localhost-wp-multisite.md
Last active Sep 19, 2015
Run Localhost WP Multisite
View localhost-wp-multisite.md

WordPress Multisite won't run on any port except 80 apparently (not tested). :8080 != :80

  1. Install Bitnami WP Multisite
  2. Modify hosts file to point 127.0.0.1 to your chosen domain
  3. Log in to WP and set up Multisite
  4. For every new subdomain, add it to the hosts file : 127.0.0.1 sub.your.domain

Modify hosts

Mac (Terminal):

@jekkilekki
jekkilekki / wp-localhost-dev.md
Last active Sep 20, 2015
Basic WP Development Environment
View wp-localhost-dev.md

#Basic WP Localhost Dev Env ######(Localhost Development Environment)

  • Localhost environment (Bitnami, MAMP, WAMP, XAMPP)
  • Local install of WP
  • Code Editor (NetBeans IDE, Sublime Text 3)
  • Browser with developer tools (Chrome F12)
  • Version control (git + GitHub)

Include Sass?

@jekkilekki
jekkilekki / wp-fancy-excerpt.md
Last active Sep 22, 2015
Better Post excerpts for WordPress
View wp-fancy-excerpt.md
/**
 * Fancy excerpts
 * 
 * @link: http://wptheming.com/2015/01/excerpt-versus-content-for-archives/
 */
function the_fancy_excerpt() {
    global $post;
    if ( has_excerpt() ) :
        the_excerpt();
@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 / dynamic-copyright-WP.md
Last active Jan 28, 2016
Creating a Dynamic Copyright in WordPress
View dynamic-copyright-WP.md
@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 / 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 / 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 / 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;
}
You can’t perform that action at this time.