Title not showing only the custom fields

Support MB Views Title not showing only the custom fieldsResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #32918
    JamesJames
    Participant

    Hi Metabox,

    Why the post title is not showing only the custom fields?

    {% set args = { post_type: "services", posts_per_page: 6 } %}
    {% set posts = mb.get_posts( args ) %}
    {% for post in posts %}
    
    <div class="services-list-container">
        <div class="services-list">
           <!-- not showing  -->
            <h2 class="services-list--item__title">{{ post.title }} </h2>
        </div>
        <div class="services-list">
            <h3 class="services-list--item__desc">{{ post.text_b3exl4mxodu }}</h3>
        </div>
        <div class="services-list">
            <div class="services-list--item">
                <a href="" class="services-list--item__btn">View Route <img src="/wp-content/uploads/2021/12/arrow-white.svg" width="auto" height="auto"></a>
                
            </div>
        </div>
    </div>
    {% endfor %}
    #32934
    Long NguyenLong Nguyen
    Moderator

    Hi Kirb,

    Please use the property post_title of the object post

    <h2 class="services-list--item__title">{{ post.post_title }}</h2>
    

    Refer to this documentation https://docs.metabox.io/extensions/mb-views/#custom-query

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