Skip to content

Instantly share code, notes, and snippets.

@bigin

bigin/catalog.php

Last active Feb 12, 2017
Embed
What would you like to do?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Basic catalog skeleton :: Categories</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="<?php get_theme_url(); ?>/css/normalize.css">
<link rel="stylesheet" href="<?php get_theme_url(); ?>/css/skeleton.css">
</head>
<body>
<div class="container">
<h1>MY PRETTY CATALOG</h1>
<h6>Select a category</h6>
<hr>
<?php
if(!empty($categories)) {
foreach($categories as $category) { ?>
<div class="row">
<div class="eight columns">
<h2><a href="./<?php echo $category->fields->slug->value; ?>/"><?php echo $category->name; ?></a></h2>
<div>
<p><?php echo '<a href="./'.$category->fields->slug->value.'/">'.getResized($category->fields->image).'</a>'; ?></p>
<div class="category_text"><?php echo $category->fields->description->value; ?>
<a href="./<?php echo $category->fields->slug->value; ?>/">Show products</a>
</div>
</div>
<hr>
</div>
</div>
<?php }
}
?>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment