Skip to content

Instantly share code, notes, and snippets.

View philipdowner's full-sized avatar

Philip Downer philipdowner

View GitHub Profile
@philipdowner
philipdowner / gist:1535015
Created December 29, 2011 17:08
WordPress If/Else
<?php
if ( is_page('my-page-slug') ) {
echo '<img src="'.get_bloginfo('template_url').'/path/to/img.png">';
} else {
get_the_title(); //Or similar code from the template
}
?>
@philipdowner
philipdowner / modify_archive_title.php
Created October 4, 2011 23:58
Modify the title tag of a WordPress custom post type archive
<?php
add_filter('wp_title', 'archive_titles');
/**
* Modify <title> if on an archive page.
*
* @author Philip Downer <[email protected]>
* @link http://manifestbozeman.com
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version v1.0
*