Skip to content

Instantly share code, notes, and snippets.

@ammist
ammist / svn_overwrite.sh
Created June 29, 2011 08:23 — forked from doolin/svn_overwrite.sh
[WP] [SVN] - Getting WordPress out of SVN
#!/usr/bin/sh
# This script will overwrite an existing
# WordPress installation with the current
# head of trunk. Once it has been reverted,
# you may need to update the database, and
# WP will prompt you for that automatically.
# This is untested with these options!
# The script commands work from the command
@ammist
ammist / wp-custom-post-type.php
Created June 15, 2011 17:03
[WP] Create a Custom Post Type
register_post_type('book', array('label' => 'Books',
'description' => 'Books and other items for sale on the Heyday website',
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'capability_type' => 'post',
'hierarchical' => false,
'rewrite' => array('slug' => ''),
'query_var' => true,
'supports' => array('title','editor','excerpt','custom-fields','revisions','thumbnail','author','page-attributes',),
@ammist
ammist / tl-cf7-captcha.html
Created May 16, 2011 00:20
Contact Form 7 with Captcha
<p>Your Name (required)<br />
[text* your-name] </p>
<p>Your Email (required)<br />
[email* your-email] </p>
<p>Subject<br />
[text your-subject] </p>
<p>Your Message<br />
[textarea your-message] </p>
<p class="captcha">
Enter the following phrase in the text box below: