Skip to content

Instantly share code, notes, and snippets.

View illucent's full-sized avatar
🎯
Focusing

Andrew Starodubtsev illucent

🎯
Focusing
View GitHub Profile
View wp-query-ref.php
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/query.php
*/
$args = array(
View gist:5563583
<?php
add_action( 'init', 'register_cpt_example' );
function register_cpt_example() {
//// Label parameters for the CPT admin
$labels = array(
'name' => _x( 'Examples', 'example' ),
'singular_name' => _x( 'Example', 'example' ),
View fb-gallery-embed.html
View post-process.php
<?php
/**
* post-process.php
* make sure to include post-process.php in your functions.php. Use this in functions.php:
*
* get_template_part('post-process');
*
*/
function do_insert() {
if( 'POST' == $_SERVER['REQUEST_METHOD']
View meta-tags.md

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@illucent
illucent / gist:8029761
Created December 18, 2013 21:00
wordpress nav
View gist:8029761
<?php
$location = 'top_nav';
if ( has_nav_menu( $location ) ) {
$args = array(
'theme_location' => 'top_nav',
'container' => '',
'container_class' => false,
'menu_class' => 'navigation_nav',
'menu_id' => 'top_navigation',
'echo' => true,
@illucent
illucent / gist:8132033
Last active April 2, 2021 00:20
.bashrc file
View gist:8132033
# /etc/profile: This file contains system-wide defaults used by
# all Bourne (and related) shells.
# http://www.guguncube.com/259/unix-collection-of-useful-bash-aliases
# aliases//http://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html
# http://dotfiles.org/~basileaf/.bashrc
[ -z "$PS1" ] && return
if [ -n "$PS1" ]; then PATH='cw-definitions-path':$PATH; export PATH; fi
View general-template.php
<?php
/**
* General template tags that can go anywhere in a template.
*
* @package WordPress
* @subpackage Template
*/
/**
* Load header template.
@illucent
illucent / gist:8575596
Created January 23, 2014 09:28
10+ handy and reusable jQuery code snippets
View gist:8575596
http://www.catswhocode.com/blog/10-handy-and-reusable-jquery-code-snippets
@illucent
illucent / gist:8845269
Created February 6, 2014 14:31
list wp page eg. sitemap
View gist:8845269
<?php
$parent = "PARENT_PAGE_ID";
$args = array(
'depth' => 0,
'show_date' => '',
'date_format' => get_option('date_format'),
'child_of' => $parent,
'exclude' => '',
'include' => '',
'title_li' => __(''),