Skip to content

Instantly share code, notes, and snippets.

@tjFogarty
Last active Aug 29, 2015
Embed
What would you like to do?
Example base.twig for use with Timber plugin for WordPress
<!doctype html>
<html class="no-js" {{site.language_attributes}}>
<head>
<meta charset="{{site.charset}}">
<title>
{% if wp_title %}
{{ wp_title }} - {{ site.name }}
{% else %}
{{ site.name }}
{% endif %}
</title>
<meta name="description" content="{{site.description}}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{{ site.theme.link }}/style.css">
</head>
<body>
<nav role="navigation">
<ul class="nav">
{% for item in primary_menu.get_items %}
<li class="nav-item {{item.classes | join(' ')}}">
<a class="nav-link" href="{{item.get_link}}">{{item.title}}</a>
</li>
{% endfor %}
</ul>
</nav>
<div class="wrapper">
{% block content %}
No content found!
{% endblock %}
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment