Created
February 4, 2018 16:11
-
-
Save JakeHenshall/32f583b03a0df0de2ad324068e2bb8b9 to your computer and use it in GitHub Desktop.
AFC repeater values from custom post type returned as a number not text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: Changelog | |
*/ | |
$context = Timber::get_context(); | |
$post = Timber::get_post(); | |
$context['changelog'] = Timber::get_posts( array( 'post_type' => 'changelog', 'posts_per_page' => -1 ) ); | |
// var_dump($context['changelog']); | |
// die; | |
Timber::render( array ( 'changelog.twig' ), $context ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base.twig" %} | |
{% block content %} | |
{% for change in changelog %} | |
<h1>{{ change.title }}</h1> | |
{{ change.type }} | |
{{ change.changes }} | |
{% endfor %} | |
{% endblock content %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment