Skip to content

Instantly share code, notes, and snippets.

View tonyahowe's full-sized avatar

Tonya Howe tonyahowe

View GitHub Profile
@tonyahowe
tonyahowe / loop.php
Created May 7, 2012 15:33
Getting Loopy
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<nav id="nav-above" class="navigation">
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'brunelleschi' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'brunelleschi' ) ); ?></div>
</nav><!-- #nav-above -->
<?php endif; ?>
<?php if ( ! have_posts() ) : ?>
<div id="post-0" class="post error404 not-found">
<h1 class="entry-title"><?php _e( 'Not Found', 'brunelleschi' ); ?></h1>
@tonyahowe
tonyahowe / author.php
Created May 7, 2012 15:37
Author Template
<?php get_header(); ?>
<?php if( brunelleschi_option('sidebar') === 'both'
|| brunelleschi_option('sidebar') === 'two left'
|| brunelleschi_option('sidebar') === 'two right'){
get_sidebar('secondary');
} ?>
<div id="main" role="main" class="<?php brunelleschi_content_class(); ?>">
<?php
if ( have_posts() )
the_post();
@tonyahowe
tonyahowe / notes
Created May 7, 2012 15:39
Custom Fields
real_author_first
real_author_last
affiliation
volume
issue
pub_date
Insert into template php:
<?php echo get_post_meta($post->ID, 'real_author_last', true); ?> <?php echo get_post_meta($post->ID, 'real_author_last', true); ?>, <?php echo get_post_meta($post->ID, 'affiliation', true); ?><br>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header>
<?php if ( is_front_page() ) { ?>
<h2 class="entry-title"><?php the_title(); ?></h2>
<?php } else { ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php } ?>
</header>
@tonyahowe
tonyahowe / loop-single.php
Created June 7, 2012 23:39
loop-single.php
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<nav id="nav-above" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'brunelleschi' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'brunelleschi' ) . '</span>' ); ?></div>
</nav><!-- #nav-above -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header>
<h1 class="entry-title"><?php the_title(); ?></h1>
@tonyahowe
tonyahowe / DC4WP.php
Created July 19, 2012 22:31
Add dublin core metadata
<?php
/*
Plugin Name: Dublin Core for WordPress
Plugin URI: http://wordpress.org/extend/plugins/dublin-core-for-wp/
Description: Inserts Dublin Core metadata (title, author, creation date, etc.) as meta tags for posts and pages. Small options screen in admin area.
Version: 0.7.2
Author: Tim McCormack, Salvatore Vassallo, Joan Junyent, Alex Oberhauser
Compatible: 2.9.2
Tags: Dublin Core, metadata
@tonyahowe
tonyahowe / functions.php
Created August 28, 2012 01:30
Added coins custom fields in functions.php
<?php
/*----------------------------------------
#
# Theme Name: Brunelleschi
# Theme Author: Kit MacAllister
#
----------------------------------------*/
/*----------------------------------------
#
@tonyahowe
tonyahowe / style.css
Created August 28, 2012 02:00
main stylesheet, brunelleschi theme
/*
Theme Name: Brunelleschi
Theme URI: http://kitmacallister.com/2011/brunelleschi/
Description: Brunelleschi is a modern theme with emphasis on readability and clean typography. Brunelleschi includes a fully flexible mobile layout and a full HTML5 implementation, that way it looks great on any screen and on any modern browser. Brunelleschi also has lots of customizable options including page-width, multiple sidebars, featured content slider and more! Available in Belarusian, Czech, Dutch, English, French, German, Italian, Russian and Spanish.
Author: Kit MacAllister
Author URI: http://kitmacallister.com/about/
Version: 1.5.5
License: GNU General Public License
License URI: license.txt
Tags: black, blue, white, light, one-column, two-columns, three-columns, right-sidebar, left-sidebar, flexible-width, custom-menu, custom-header, custom-background, theme-options, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader>
<fileDesc>
<titleStmt>
<title>The Tatler No. 238, 1710</title>
<author><forename>Jonathan</forename>
<surname>Swift</surname></author>
<meeting>Digital.Humanities @ Oxford Summer Seminar 2013</meeting>
@tonyahowe
tonyahowe / epistolary.xsl
Last active December 19, 2015 17:49
Working XSLT for the file evelina.xml
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xpath-default-namespace="http://www.tei-c.org/ns/1.0" version="2.0">
<xsl:template match="TEI">
<html>
<head>
<title>Evelina; or, The History of a Young Lady's Entrance Into the World</title>
<style type="text/css">
body{
font:13px georgia;