Basic stuff in views

Support MB Views Basic stuff in viewsResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34212
    ErikErik
    Participant

    Hi
    Still a rookie in views
    I want to make a list of post on the front page with views

    I take this and ok for the post title but how for the content
    {{ post.content }} alone doesn't work. Thanks to put me on good tracks

    
    {% set args = { post_type: 'post', posts_per_page: -1 } %}
    {% set posts = mb.get_posts( args ) %}
    {% for post in posts %}
       <h3>Post title: {{ post.post_title }}</h3> 
    <p>{{ post.content }} </p>
    {% endfor %}<br />
    
    #34217
    Long NguyenLong Nguyen
    Moderator

    Hi Erik,

    Please use the property post_content to get the post content in the custom query.
    <p>{{ post.post_content }}</p>

    Read more on the documentation https://docs.metabox.io/extensions/mb-views/#custom-query

    #34219
    ErikErik
    Participant

    Thanks for your reply and support. Difficult to catch all of these in your online documentation though. Some tuts will be welcome

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.