Skip to content

Instantly share code, notes, and snippets.

@mikeknoop mikeknoop/html-header.php
Last active Dec 14, 2015

Embed
What would you like to do?
<?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
You can’t perform that action at this time.