Post Metadata

To add a meta (stored as a WordPress post meta, here a meta called pdf) to your post data (in a variable called pdf_url):

Then, on app side, to display your post meta in your template:

Post Featured Image Sizes

To add a different image size (like thumbnail) to your post data (in a variable called archive_img):

Then you can use this new image format in your archive.html app template: replace post.thumbnail.src by post.archive_img.src.

Taxonomy Terms

To add the terms of a given taxonomy (my_taxonomy) to your post data (in a variable called my_terms):

Comments

To add post comments to your post data instead of retrieving them dynamically (in a variable called comments):

To Know More

Published by Lionel on January 5, 2017

Web Developer for an insurance company, WordPress since 2009, aware about front-end performance and curious about (almost) anything

2 Comments

  1. Hello,

    Thank you for these amazing tutorials.

    I have a question, I would like to have all the thumbnail images of the same size in the archive.html, that is 370x210px.

    Can you give me a help please.

    Thank you,
    Greetings.

    Reply
    • Hi,
      If this custom 370x210px size is already an image size defined in you WordPress configuration (by your theme or a plugin) you can replace ‘thumbnail’ by this custom image size name in the above code for “Post Featured Image Sizes”.
      If this custom size is not defined yet you’ll have to add it using the add_image_size() function in your site theme (not app theme), then use the name of this image size in the above code to send it to your app.
      Regards

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Having questions?

FAQ | Tutorials | Documentation

Or

Contact Us