Skip to content

Instantly share code, notes, and snippets.

@mikeknoop
Last active December 14, 2015 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeknoop/5105427 to your computer and use it in GitHub Desktop.
Save mikeknoop/5105427 to your computer and use it in GitHub Desktop.
<?php $blog = true; // only set on blog pages ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php
$title = "Mike Knoop | Founder, Web Developer, and Mechanical Engineer";
$description = "Personal archive and blog for all the awesome stuff I work on, including my current startup Zapier. Connect with me on Twitter and Google+.";
if ($blog) {
$title = "Blog | Mike Knoop";
if (!$all_posts) {
$title = get_post()->post_title . " | Mike Knoop";
$description = strip_tags(get_the_excerpt());
}
}
?>
<?php endwhile; endif; ?>
<meta name="description" content="<?php echo $description; ?>">
<title><?php echo $title; ?></title>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment