This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Unplugged Mobile Theme | |
Plugin URI: http://www.rachelbaker.me | |
Description: A plugin and theme for WordPress that automatically reformats your blog's content for optimized viewing on Apple's <a href="http://www.apple.com/unplugged/">unplugged</a> and <a href="http://www.apple.com/ipodtouch/">iPod touch</a>. | |
Author: Rachel Baker | |
Version: 0.1 | |
Author URI: http://www.rachelbaker.me | |
# Special thanks to Imthiaz Rafiq and the wp-pda Plugin (http://imthi.com/wp-pda/) which this plugin is derived from. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'genesis_loop', 'cd_custom_taxonomy_archives' ); | |
/** | |
* Output the taxonomy name and an associated taxonomy image | |
*/ | |
function cd_custom_taxonomy_archives() { | |
//print the page title | |
the_title('<h1 class="entry-title">', '</h1>'); | |
// Code sample modified from example on http://wordpress.mfields.org/plugins/taxonomy-images/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
remove_action( 'genesis_header', 'genesis_do_header' ); | |
add_action( 'genesis_header', 'shireman_do_custom_header' ); | |
/** | |
* Modify the default header, including the #title-area div, | |
* along with #title and #description. | |
* | |
* Calls the genesis_site_title, and genesis_site_description. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'genesis_setup', 'ssm_theme_setup', 15 ); | |
/** | |
* This function runs when the them is loaded and is responsible for running | |
* all the action and filter hook functions that customize the theme; | |
*/ | |
function ssm_theme_setup() { | |
/** Run some code on the genesis before hook */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Usage for a custom post type named 'movies': | |
* unregister_post_type( 'movies' ); | |
* | |
* Usage for the built in 'post' post type: | |
* unregister_post_type( 'post', 'edit.php' ); | |
*/ | |
function unregister_post_type( $post_type, $slug = '' ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $wp_query; | |
if( 3 == $wp_query->current_post || 3 == $wp_query->current_post % 4 ) | |
echo 'this is the fourth post'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function wps_do_pitbull_image_one() { | |
global $post; | |
wps_id_open( 'pitbull_image_one' ); | |
$pitbull_image_one_id = genesis_get_custom_field( '_d2c_pitbull_image_one' ); | |
echo wp_get_attachment_image( | |
$pitbull_image_one_id, | |
'smallersquare', | |
false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Custom Category Template | |
* | |
* @package my_child_theme | |
* @since 1.0.0 | |
* @author Travis Smith <t@wpsmith.net> | |
* @copyright Copyright (c) 2013, Travis Smith | |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License | |
* @link https://gist.github.com/wpsmith/5062834 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'pre_get_posts', 'smythe_no_paging' ); | |
/** | |
* Remove pagination from all archive pages | |
* | |
* @author Travis Smith | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/customize-the-wordpress-query/ | |
* @param object $query data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Twitter Chat Archive: | |
Get hashtag results from Twitter Search API (in JSON) for a weekly chat. | |
API takes date range via values: 'since' thru 'until' (YYYY-MM-DD). | |
API limits: 1 page per request, 100 results per page, 1500 total results: <7 days old. | |
Script below: Repeats page requests until no results found w/in date-range. | |
Then gathers only those results w/in specified timestamp range. | |
Then sort results from oldest to newest. |