The View shortcode doesn't show

Support MB Views The View shortcode doesn't show

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #43427
    Fabio ValenteFabio Valente
    Participant

    I created a view that I can see into the archive post type, but if I copy the shortcode
    [mbv name="eventi-elenco"] the shortcode not function in any page.
    Sometimes show the 503 error.
    Regards.

    #43435
    PeterPeter
    Moderator

    Hello Fabio,

    Can you please share some screenshots of the View content and settings (full screen)?

    #43441
    Fabio ValenteFabio Valente
    Participant

    The code:

    <main class="max-x-3xl mx-auto p-4">
    {% for post in query.posts %}
    <div class="flex mb-6 border border-gray-400 rounded">
    <div class="flex-1 p-4">
    <h2> {{ post.title }}</h2>
    {{ post.data_ora_inizio | date( 'd/m/Y' ) }} - {{ post.citta.label }}
    <div class = "mt-3">
    {{ post.content }}
    </div>
    </div>
    </div>
    {% endfor %}

    {{ mb.get_the_posts_pagination() }}
    </main>

    and the settings:

    settings

    #43448
    PeterPeter
    Moderator

    Hello,

    As you can see in the screenshot, the Type and Location of the View is set to Archive page - Evento Archive, then this View only works on that archive page.

    If you want to create a View that can be used on any page, please select the Type: Shortcode.

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