Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
dreaddesign authored Dec 17, 2017
1 parent b450e09 commit 514579e
Show file tree
Hide file tree
Showing 75 changed files with 12,254 additions and 0 deletions.
98 changes: 98 additions & 0 deletions archive-beer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?php
/**
* @package WordPress
*/
$title = '';
if (is_category()) { // category
$title = single_cat_title('', false);
} else if (is_tag()) { // tag
$title = single_tag_title('', false);
} else if (is_tax()) { // custom taxonomy
$title = get_queried_object()->name;
} else if (is_post_type_archive()) {// custom post type
$title = post_type_archive_title('', false);
} else if (is_day()) { // date -> day
$title = get_the_time('F j, Y');
} else if (is_month()) { // date -> month
$title = get_the_time('F, Y');
} else if (is_year()) { // date -> year
$title = get_the_time('Y');
} else if (is_author()) { // author
$author = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
$title = $author->display_name;
}

get_header(); ?>


<div class="main-content-wrapper">
<div class="content-wrapper">

<main class="main beer" role="main">

<?php if (have_posts()): ?>

<?php if(get_field('beer_archive_title', 'option')) { ?>
<h1><?php the_field('beer_archive_title', 'option'); ?></h1>
<?php } else { ?>
<?php if ($title): ?>
<h1><?php echo $title; ?></h1>
<?php endif; ?>
<?php } ?>

<?php echo do_shortcode('[listmenu menu="Beers"]'); ?>

<section>

<?php while (have_posts()): the_post(); ?>

<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<?php if(get_field('archive_image')) { ?>
<div class="left">
<img src="<?php the_field('archive_image'); ?>" alt="Photo of <?php the_title(); ?>" />
</div><!--left-->
<?php } ?>

<?php if(get_field('archive_image')) { ?>
<div class="right">
<?php } ?>

<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

<div class="top"><?php the_content(); ?></div>
<?php if(get_field('availability')) { ?><p><strong>Beer Name:</strong><?php the_field('availability'); ?></p><?php } ?>
<?php if(get_field('package_size')) { ?><p><strong>Beer Style:</strong><?php the_field('package_size'); ?></p><?php } ?>
<?php if(get_field('abv')) { ?><p><strong>ABV %:</strong><?php the_field('abv'); ?></p><?php } ?>
<?php if(get_field('grains')) { ?><p><strong>IBU:</strong><?php the_field('grains'); ?></p><?php } ?>
<?php if(get_field('hops')) { ?><p><strong>Serving Style:</strong><?php the_field('hops'); ?></p><?php } ?>
<?php if(get_field('spices')) { ?><p><strong>Seasonal Availability:</strong><?php the_field('spices'); ?></p><?php } ?>
<?php if(get_field('yeast')) { ?><p><a href="<?php the_field('yeast'); ?>" target="_blank"><strong>Untappd</strong></a></p><?php } ?>

<?php if(get_field('archive_image')) { ?>
</div><!--right-->
<?php } ?>
</div><!--/post-->

<?php endwhile; ?>

<div class="navigation">
<div class="alignleft"><?php next_posts_link('&laquo; View More Beers') ?></div>
<div class="alignright"><?php previous_posts_link('View More Beers &raquo;') ?></div>
</div>

</section>

<?php else: ?>

<?php get_template_part('notfound'); ?>

<?php endif; ?>

</main><!--/main-->

<?php get_sidebar(); ?>

</div><!--/content-wrapper-->
</div><!--/main-content-wrapper-->

<?php get_footer(); ?>
106 changes: 106 additions & 0 deletions archive-beer_5-21-17.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<?php
/**
* @package WordPress
*/
$title = '';
if (is_category()) { // category
$title = single_cat_title('', false);
} else if (is_tag()) { // tag
$title = single_tag_title('', false);
} else if (is_tax()) { // custom taxonomy
$title = get_queried_object()->name;
} else if (is_post_type_archive()) {// custom post type
$title = post_type_archive_title('', false);
} else if (is_day()) { // date -> day
$title = get_the_time('F j, Y');
} else if (is_month()) { // date -> month
$title = get_the_time('F, Y');
} else if (is_year()) { // date -> year
$title = get_the_time('Y');
} else if (is_author()) { // author
$author = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
$title = $author->display_name;
}

get_header(); ?>

<div class="main-content-wrapper">
<div class="content-wrapper">

<main class="main beer" role="main">

<?php if (have_posts()): ?>

<?php if(get_field('beer_archive_title', 'option')) { ?>
<h1><?php the_field('beer_archive_title', 'option'); ?></h1>
<?php } else { ?>
<?php if ($title): ?>
<h1><?php echo $title; ?></h1>
<?php endif; ?>
<?php } ?>

<?php if( have_rows('category', 'option') ): ?>
<ul class="custom_cat_list">
<div class="content">
<?php while( have_rows('category', 'option') ): the_row(); ?>
<li><a href="<?php the_sub_field('category_link', 'option'); ?>"><?php the_sub_field('category_title', 'option'); ?></a></li>
<?php endwhile; ?>
</div>
<ul>
<?php endif; ?>

<section>

<?php while (have_posts()): the_post(); ?>

<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<?php if(get_field('archive_image')) { ?>
<div class="left">
<img src="<?php the_field('archive_image'); ?>" alt="Photo of <?php the_title(); ?>" />
</div><!--left-->
<?php } ?>

<?php if(get_field('archive_image')) { ?>
<div class="right">
<?php } ?>

<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

<div class="top"><?php the_content(); ?></div>
<?php the_content(); ?></div>
<?php if(get_field('availability')) { ?><p><strong>Beer Name:</strong><?php the_field('availability'); ?></p><?php } ?>
<?php if(get_field('package_size')) { ?><p><strong>Beer Style:</strong><?php the_field('package_size'); ?></p><?php } ?>
<?php if(get_field('abv')) { ?><p><strong>ABV %:</strong><?php the_field('abv'); ?></p><?php } ?>
<?php if(get_field('grains')) { ?><p><strong>IBU:</strong><?php the_field('grains'); ?></p><?php } ?>
<?php if(get_field('hops')) { ?><p><strong>Serving Style:</strong><?php the_field('hops'); ?></p><?php } ?>
<?php if(get_field('spices')) { ?><p><strong>Seasonal Availability:</strong><?php the_field('spices'); ?></p><?php } ?>
<?php if(get_field('yeast')) { ?><p><a href="<?php the_field('yeast'); ?>" target="_blank"><strong>Untappd</strong></p><?php } ?>

<?php if(get_field('archive_image')) { ?>
</div><!--right-->
<?php } ?>
</div><!--/post-->

<?php endwhile; ?>

<div class="navigation">
<div class="alignleft"><?php next_posts_link('&laquo; Older Posts') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Posts &raquo;') ?></div>
</div>

</section>

<?php else: ?>

<?php get_template_part('notfound'); ?>

<?php endif; ?>

</main><!--/main-->

<?php get_sidebar(); ?>

</div><!--/content-wrapper-->
</div><!--/main-content-wrapper-->

<?php get_footer(); ?>
82 changes: 82 additions & 0 deletions archive.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?php
/**
* @package WordPress
*/
$title = '';
if (is_category()) { // category
$title = single_cat_title('', false);
} else if (is_tag()) { // tag
$title = single_tag_title('', false);
} else if (is_tax()) { // custom taxonomy
$title = get_queried_object()->name;
} else if (is_post_type_archive()) {// custom post type
$title = post_type_archive_title('', false);
} else if (is_day()) { // date -> day
$title = get_the_time('F j, Y');
} else if (is_month()) { // date -> month
$title = get_the_time('F, Y');
} else if (is_year()) { // date -> year
$title = get_the_time('Y');
} else if (is_author()) { // author
$author = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
$title = $author->display_name;
}

get_header(); ?>

<div class="main-content-wrapper">
<div class="content-wrapper">

<main class="main" role="main">

<?php if (have_posts()): ?>

<section>

<?php if ($title): ?>
<h1><?php echo $title; ?></h1>
<?php endif; ?>

<h1>Blog</h1>

<?php while (have_posts()): the_post(); ?>

<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<div class="topmeta">
<span class="date"><?php echo the_time("F jS, Y"); ?></span>
</div><!--/topmeta-->
<div class="postcontent">
<?php the_excerpt(); ?>
<?php wp_link_pages(); ?>
</div><!--/postcontent-->
<?php if (get_the_tags()) { ?><span class="tags"><?php the_tags('', ', ', ''); ?></span><?php } ?>
<div class="bottommeta">
<span class="category"><?php the_category(',') ?> </span>
<span class="comments"><?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?></span>
</div><!--/bottommeta-->
</div><!--/post-->

<?php endwhile; ?>

<div class="navigation">
<div class="alignleft"><?php next_posts_link('&laquo; Older Posts') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Posts &raquo;') ?></div>
</div>

</section>

<?php else: ?>

<?php get_template_part('notfound'); ?>

<?php endif; ?>

</main><!--/main-->

<?php get_sidebar(); ?>

</div><!--/content-wrapper-->
</div><!--/main-content-wrapper-->

<?php get_footer(); ?>
105 changes: 105 additions & 0 deletions comments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<?php
/**
* @package WordPress
*/
?>

<div class="post-comments">

<?php
// Do not delete these lines
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');

if (post_password_required()) { ?>
<p class="nocomments">This post is password protected. Enter the password to view comments.</p>
<?php
return;
}
?>

<?php if (have_comments()): ?>
<h2><?php comments_number('No Comments', 'One Comment', '% Comments' );?></h2>

<div class="navigation">
<div class="alignleft"><?php previous_comments_link() ?></div>
<div class="alignright"><?php next_comments_link() ?></div>
</div>

<ol class="comment-list">
<?php wp_list_comments(); ?>
</ol>

<div class="navigation">
<div class="alignleft"><?php previous_comments_link() ?></div>
<div class="alignright"><?php next_comments_link() ?></div>
</div>
<?php else : // this is displayed if there are no comments so far ?>

<?php if (comments_open()) : ?>
<!-- If comments are open, but there are no comments. -->

<?php else: // comments are closed ?>
<!-- If comments are closed. -->
<p class="nocomments">Comments are closed.</p>

<?php endif; ?>
<?php endif; ?>


<?php if (comments_open()) : ?>

<div id="respond" class="comments-respond"><a name="respond"></a>

<h3>Add a Comment</h3>

<div class="cancel-comment-reply">
<small><?php cancel_comment_reply_link(); ?></small>
</div>

<?php if (get_option('comment_registration') && !is_user_logged_in()) : ?>
<p>You must be <a href="<?php echo wp_login_url(get_permalink()); ?>">logged in</a> to post a comment.</p>
<?php else : ?>

<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">

<?php if (is_user_logged_in()): ?>
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>.
<a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out &raquo;</a>
</p>
<?php else : ?>
<p class="form-field-wrapper">
<label for="author" <?php if ($req) echo 'class="required"'; ?>>Name</label>
<input type="text" name="author" id="author" value="" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> class="textbox" />
</p>
<p class="form-field-wrapper">
<label for="email" <?php if ($req) echo 'class="required"'; ?>>Email Address <span class="note">(will not be published)</span></label>
<input type="text" name="email" id="email" value="" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> class="textbox" />
</p>
<p class="form-field-wrapper">
<label for="url">Website</label>
<input type="text" name="url" id="url" value="" tabindex="3" class="textbox" />
</p>
<?php endif; ?>

<p class="form-field-wrapper">
<label for="comment" class="required">Comment:</label>
<textarea name="comment" id="comment" cols="58" rows="10" tabindex="4" class="textbox"></textarea>
</p>

<p class="form-field-wrapper submit-wrapper">
<input name="submit" type="submit" id="submit" tabindex="5" value="Submit" />
</p>
<?php comment_id_fields(); ?>

<?php do_action('comment_form', $post->ID); ?>

</form>

<?php endif; // If registration required and not logged in ?>

</div><!--/comments-respond-->

<?php endif; // if comments open ?>

</div><!--/post-comments-->
Binary file added favicon.ico
Binary file not shown.
Loading

0 comments on commit 514579e

Please sign in to comment.