Skip to content

Instantly share code, notes, and snippets.

View inerds's full-sized avatar

Inad Hussein inerds

View GitHub Profile
@inerds
inerds / list-subpages.php
Last active August 29, 2015 14:11
List subpages of parent page (with parent page title) in Wordpress
<?php if ( is_page() ) { ?>
<?php
if($post->post_parent)
$children = wp_list_pages('title_li=&child_of='.$post->post_parent.'&echo=0'); else
$children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
if ($children) { ?>
<h4>
<?php
@inerds
inerds / change featured image box text
Created April 15, 2012 12:13
Change set featured image box text (Wordpress), just paste it to functions.php
@inerds
inerds / .htaccess
Created April 14, 2012 22:45 — forked from necolas/.htaccess
Simple, quick way to concatenate, minify, and version static files in a Wordpress theme
# Filename-based cache busting
# taken from https://github.com/h5bp/html5-boilerplate/
# This rewrites file names of the form `name.123456.js` to `name.js`
# so that the browser doesn't use the cached version when you have
# updated (but not manually renamed) the file.
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On