Skip to content

Instantly share code, notes, and snippets.

@hermpheus
hermpheus / is_blog.php
Created March 17, 2012 18:47 — forked from wesbos/is_blog.php
WordPress is_blog()
function is_blog () {
global $post;
$posttype = get_post_type($post );
return ( ((is_archive()) || (is_author()) || (is_category()) || (is_home()) || (is_single()) || (is_tag())) && ( $posttype == 'post') ) ? true : false ;
}
Usage:
<?php if (is_blog()) { echo 'You are on a blog page'; } ?>
@hermpheus
hermpheus / GetWP
Created July 5, 2012 20:33 — forked from scottlee/GetWP
Ubuntu LAMP: Create WordPress install, apache, hosts, etc
#!/bin/bash
##########
## Setup: hardcode your mysql user/pass. Yeah, yeah, I know...it's frowned upon.
## but for local development, I have no problem with it.
## Find and replace: MYSQLUSER / MYSQLPASS
##
## Usage: This script accepts only one variable, the site name.
##
#########
@hermpheus
hermpheus / ultimate-helvetica-fontstack.css
Created October 31, 2012 17:42 — forked from kahlil/ultimate-helvetica-fontstack.css
The ultimate Helvetica Fontstack with the free font 'TexGyreHeros' as a fallback. Download the @fontface-kit here: http://www.fontsquirrel.com/fonts/TeX-Gyre-Heros
/* regular */
font-family: "HelveticaNeue", "Helvetica Neue", "HelveticaNeueRoman", "HelveticaNeue-Roman", "Helvetica Neue Roman", 'TeXGyreHerosRegular', "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
font-weight:400;
font-stretch:normal;
/* condensed */
font-family: "HelveticaNeueCondensed", "HelveticaNeue-Condensed", "Helvetica Neue Condensed",  "HelveticaNeueRomanCondensed", "HelveticaNeue-Roman-Condensed", "Helvetica Neue Roman Condensed", "HelveticaNeue", "Helvetica Neue", "HelveticaNeueRoman", "HelveticaNeue-Roman", "Helvetica Neue Roman", 'TeXGyreHerosCnRegular', "Helvetica", "Tahoma", "Geneva", "Arial Narrow", "Arial", sans-serif;
font-weight:400;
font-stretch:condensed;