Skip to content

Instantly share code, notes, and snippets.

View jekkilekki's full-sized avatar

Aaron Snowberger jekkilekki

View GitHub Profile
@jekkilekki
jekkilekki / localhost-wp-multisite.md
Last active September 19, 2015 21:49
Run Localhost WP Multisite

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 September 20, 2015 20:19
Basic WP Development Environment

#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 September 22, 2015 09:03
Better Post excerpts for WordPress
/**
 * 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 / jetpack-likes-fix.md
Last active November 13, 2015 04:54
Fix the WP Jetpack Likes text on Pages

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 November 30, 2015 00:52
Collection of Quick CSS Gists
/* Courtesy of CSS Tricks: https://css-tricks.com/snippets/css/clear-fix/ */
.group:after {
content: "";
display: table;
clear: both;
}
@jekkilekki
jekkilekki / dynamic-copyright-WP.md
Last active January 28, 2016 20:56
Creating a Dynamic Copyright in WordPress
@jekkilekki
jekkilekki / custom-wp-hooks.php
Created October 16, 2016 06:38
Create custom Action and Filter hooks for your plugins in WordPress
<?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 / 01-react-syntax.jsx
Last active December 15, 2016 12:32
Basic ReactJS work
// React Native syntax
var MyComponent = React.createClass({
render() {
return <div>
<h1>Hello World</h1>
<p>This is my first React component!</p>
</div>
}
})
@jekkilekki
jekkilekki / dot-border.svg
Last active December 18, 2016 11:09
SVG to create true round-dotted borders
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.