Skip to content

Instantly share code, notes, and snippets.

View palimadra's full-sized avatar

Pali Madra palimadra

View GitHub Profile
@palimadra
palimadra / functions.php
Created March 27, 2012 13:05 — forked from mattonomics/functions.php
Thesis Child Theme - Advanced
<?php
if (! defined('ABSPATH'))
die('Please do not directly access this file');
include_once(TEMPLATEPATH . '/functions.php');
class thesis_child_theme_example extends thesis_custom_loop {
public function __construct() {
@palimadra
palimadra / functions.php
Created March 27, 2012 13:05 — forked from mattonomics/functions.php
Thesis Child Theme - Advanced
<?php
if (! defined('ABSPATH'))
die('Please do not directly access this file');
include_once(TEMPLATEPATH . '/functions.php');
class thesis_child_theme_example extends thesis_custom_loop {
public function __construct() {
@palimadra
palimadra / functions.php
Created March 27, 2012 13:05 — forked from mattonomics/functions.php
Thesis Child Theme - Basic
<?php
// Iinitial sanity check
if (! defined('ABSPATH'))
die('Please do not directly access this file');
// Bring in the main functions file so we have access to all the yummy Thesis goodness
include_once(TEMPLATEPATH . '/functions.php');
// we encourage you to set up a class. classes are a VERY important part of 2.0, so you need to be familiar with them.
@palimadra
palimadra / custom.css
Created March 27, 2012 13:05 — forked from mattonomics/custom.css
Thesis Skin Starter Template - Advanced
/*---:[ body ]:---*/
body { background: #000; }
/*---:[ menu ]:---*/
.menu { list-style: none; }
.menu li { float: left; }
.menu li a { text-decoration: none; display: block; }
/*---:[ post image fix from @kristarella ]:---*/
.post_image { max-width: 100%; height: auto; }
@palimadra
palimadra / custom.css
Created March 27, 2012 13:05 — forked from mattonomics/custom.css
Thesis Skin Starter Template - Basic
/*---:[ body ]:---*/
body.custom { background: #000; }
@palimadra
palimadra / css3nameplate.html
Created April 4, 2012 08:13
css3 nameplate
<DOCTYPE html>
<html>
<head>
<title>nameplate</title>
</head>
<style>
#angle {
width: 150px;
height: 150px;
background: #626262;
@palimadra
palimadra / .htaccess
Created April 15, 2012 16:02 — 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
@palimadra
palimadra / WP_admin_bar_theme_editor
Created April 26, 2012 15:38
WordPress - Add a theme editor to the Admin bar
// Add Theme Editor to Admin Bar (to save time!)
function admin_bar_theme_editor_option() {
global $wp_admin_bar;
if ( !is_super_admin() || !is_admin_bar_showing() )
return;
$wp_admin_bar->add_menu(
array( 'id' => 'edit-theme',
'title' => __('Edit Theme'),
'href' => admin_url( 'theme-editor.php')
)
@palimadra
palimadra / Insert text into all WordPress posts
Created April 28, 2012 11:28
Automatically insert text into WordPress posts (all of them)
<!-- add this piece of code to the functions.php file -->
add_filter( 'default_content', 'my_editor_content' );
function my_editor_content( $content ) {
$content = "I want this text to be automatically included.";
return $content;
}
?>
<!-- Thanks WPrecipies.com -->
@palimadra
palimadra / WordPress image caption CSS
Created April 28, 2012 11:30
Add styling captions to the images on your WordPress based site
/* add this code to style.cc */
/* Captions */
.aligncenter,
div.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}
.wp-caption {