Skip to content

Instantly share code, notes, and snippets.

@danlum
danlum / wp-head-cleanup.php
Created November 12, 2012 09:33 — forked from rachelbaker/wp-head-cleanup.php
Clean up the WordPress head section
<?php
/**
* Cleaning up the WordPress <head> section
*/
function rb_cleanupheaderlinks() {
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'wp_generator');
}
@danlum
danlum / gist:3876993
Created October 12, 2012 02:27
PHP Time
The following characters are recognized in the format parameter string
| Format | Description | Example returned values |
| ------ | ----------- | ----------------------- |
| Day |
| ------ | ----------- | ----------------------- |
| %a | An abbreviated textual representation of the day | Sun through Sat |
%A A full textual representation of the day Sunday through Saturday
%d Two-digit day of the month (with leading zeros) 01 to 31
%e Day of the month, with a space preceding single digits. Not implemented as described on Windows. See below for more information. 1 to 31
%j Day of the year, 3 digits with leading zeros 001 to 366
@danlum
danlum / gist:3812973
Created October 1, 2012 16:50
Styling ordered list numbers (demo)
<!-- http://www.456bereastreet.com/lab/styling-ordered-list-numbers/ -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Styling ordered list numbers demo page | Lab | 456 Berea Street</title>
<style media="screen,print">
@import '/css/lab.css';
#body {
@danlum
danlum / gist:3802764
Created September 29, 2012 00:44
wordpress: stop <p></p>
<?php
/* Stop WordPress from adding those annoying paragraph tags */
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );
?>