Skip to content

Instantly share code, notes, and snippets.

View avclark's full-sized avatar

Adam Clark avclark

View GitHub Profile
<?php
class Init_Menu_Item {
public function __construct() {
$this->initialize();
}
public function initialize() {
add_action( 'admin_menu', array( $this, 'init_menu_item') );
@avclark
avclark / 0_reuse_code.js
Created April 15, 2016 04:40
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@avclark
avclark / footer-2-text-widget.html
Created May 9, 2016 04:55
The code used in the Text Widget in the Footer 2 Widget Area in the Community Pro Theme.
@avclark
avclark / .gitignore
Created July 6, 2017 03:55
git ignore boilerplate for WP
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
@avclark
avclark / .gitignore
Created April 17, 2018 03:16 — forked from salcode/.gitignore
See https://salferrarello.com/wordpress-gitignore/ for the latest version of my WordPress .gitignore file
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
<?php
$temp = $wp_query;
$wp_query = null;
$wp_query = new WP_Query();
$wp_query->query('showposts=6&post_type=news'.'&paged='.$paged);
while ($wp_query->have_posts()) : $wp_query->the_post();
?>
<!-- LOOP: Usual Post Template Stuff Here-->