Skip to content

Instantly share code, notes, and snippets.

somone said this would be easy. someone LIED.

Norcross norcross

somone said this would be easy. someone LIED.
View GitHub Profile
norcross / admin-notice-class.php
Created Jul 27, 2017 — forked from monkeymonk/Notice.php
WordPress Admin Notice Helper Class
View admin-notice-class.php
* Helper to work with Wordpress admin notices
* @example
* Notice::success('All is good!');
* @example
* Notice::warning('Do something please.', true);
norcross / country-array.php
Last active Jan 24, 2020 — forked from DHS/PHP Countries Array
PHP array of all country names
View country-array.php
$countries = array(
'American Samoa',
View always-login.php
* keeps a user always logged in
* don't use this on a production site, ever!
add_action( 'init', 'rkv_auto_login' );
add_action( 'admin_init', 'rkv_auto_login' );
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php
#Redirect an entire site:
Redirect 301 /
#Redirect an entire site to a sub folder
Redirect 301 /
norcross / 0_reuse_code.js
Created Aug 1, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View widget.php
* ITS Related Links
* The WordPress Widget Boilerplate is an organized, maintainable boilerplate for building widgets using WordPress best practices.
class ITS_Contact_Box extends WP_Widget {
norcross / chilpages-looping.php
Last active Dec 20, 2015 — forked from crondeau/chilpages-looping.php
modified version of child loops
View chilpages-looping.php
function rkv_child_pages( $this_page ) {
$args = array(
'fields' => 'ids',
'post_type' => 'work',
'post_parent' => $this_page,
'nopaging' => true,
'orderby' => 'menu_order'
View Image-Waterfall.php
// let's go through and get the right image
function dg_thumb_waterfall() {
global $post;
if ( has_post_thumbnail($post->ID) ) {
echo '<div class="thumbnail-wrapper">';
echo '</div>';