Support » Plugin: AMP » Outputting terms from rest api into a amp-list select

  • Resolved Chris Rault


    Hello fellow AMPers 🙂

    I recently updated our custom post type index to pull directly from the WP api using amp-list and mustache, which is working well.

    I am now working on implementing options to filter and sort the results.

    I’ve gone over every example I can find, but I can’t seem to get the taxonomy terms to output in a single select.

    The terms are being outputted, but as individual selects (you can see it in action here -> I’ve tried every variation I can think of, but to no avail.

    Here is the code I am using to generate the select:

    <div class="container uk-text-left">
        <amp-list height="80" template="styles-list" layout="fixed-height" src="" items=".">
    		<div placeholder>Loading...</div>
            <div fallback>Failed to load wine styles</div>
            <template type="amp-mustache" id="styles-list">
                <option value="">Filter by Style</option>
                    <option value="{{slug}}">{{name}}</option>

    I’ve tried moving the selects to outside the template tag, but then the terms output as plain text and the select is empty.

    Any ideas what I’m missing?


    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Outputting terms from rest api into a amp-list select’ is closed to new replies.