Shortcode in archive page shows only the last post data

Support MB Views Shortcode in archive page shows only the last post dataResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #38405
    gildo@fattoriacreativa.it[email protected]
    Participant

    Hi, I'm trying to use a view, using shortcode, inside my own custom post archive template (builded without using MBV). What I need is to build a MB view that I can use in both archive and single page of my custom post. Inside single template it works fine but in archive page, the shortcode shows only the latest post data for all posts in the archive. It's look like the shortcode doesn't retrive the correct post ID for all posts. How I can resolve?

    #38424
    Long NguyenLong Nguyen
    Moderator

    Hi,

    You should create two different View templates, one used on the archive page and one used on the single post. If you use the shortcode of the single post, it will not work correctly. Please read more about WP template here https://developer.wordpress.org/themes/basics/template-hierarchy/

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