Skip to content

Instantly share code, notes, and snippets.

View joshfitzgerald's full-sized avatar

Josh Fitzgerald joshfitzgerald

  • Slickdeals
  • Las Vegas
View GitHub Profile
/*
Theme Name: ReClean
Theme URI: http://www.codenx.com/
Theme Version: 1.0
Theme Date: 2013-03-12
Theme Author: CodeNx
Theme Author URI: http://www.codenx.com/
Theme License: GPLv2
*/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="description" content="A description about your site" />
<title>Barebones Site - A really basic example of theming from scratch</title>
<link rel="stylesheet" href="path/to/css/reset.css" media="screen" />
<link rel="stylesheet" href="path/to/css/style.css" media="screen" />
<!--[if IE]>
<?php
/*
Template Name: Automagic Sitemap
Will automatically generate a sitemap from the wordpress database of posts, pages, and categories.
*/
?>
<?php get_header(); ?>
<div id="content">
<table class="form-table">
<tbody>
<tr valign="top">
<th scope="row">
<label>Option 1</label>
</th>
<td>
INPUT 1
</td>
</tr>
<?php
//show the form if the user is not logged in
if( !is_user_logged_in() ):
wp_login_form();
else:
$redirect = home_url();
echo '<a href="'.wp_logout_url( $redirect ).'">Log Out</a>';
endif;
?>
<?php
//change the default (55 words) length of excerpts to 20 words
function new_ex_length($length) {
return 20;
}
add_filter('excerpt_length', 'new_ex_length', 999);
//changes the [...] to a button when excerpt content is truncated
function new_excerpt_more($more) {
$readmore = 'Read More';
/*
== meyer reset
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
<?php
//show the form if the user is not logged in
if( !is_user_logged_in() ):
wp_login_form();
else:
$redirect = home_url();
echo '<a href="'.wp_logout_url( $redirect ).'">Log Out</a>';
endif;
?>
<?php
/**
* Set up Widget Areas (Dynamic Sidebars)
*/
register_sidebar( array(
'name' => 'Home Features',
'description' => 'An area near the bottom of the home page',
'id' => 'home-features',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
<?php
function awesome_comment_reply(){
if( !is_admin() &amp;&amp; is_singular() &amp;&amp; comments_open() &amp;&amp; get_option('thread_comments') ):
wp_enqueue_script( 'comment-reply' );
endif;
}
add_action( 'wp_print_scripts', 'awesome_comment_reply' );