Integrate a view in a regular page

Support MB Views Integrate a view in a regular page

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #34153
    Catharina von HobeCatharina von Hobe
    Participant

    How can I build a view with a certain post type, which I can insert via shortcode in any page?
    For example: I want to show a list of available apartments on my frontpage. The apartments are a custom post type. The information, if the apartment is available, is saved in a custom field (true/false).
    How do I build a view like this with Meta Box Views and how can I integrate it into my frontpage?

    #34162
    Long NguyenLong Nguyen
    Moderator

    Hi Catharina,

    You can create a View with Type: Shortcode, use the custom query to show list posts of a custom post type then add the shortcode to any page to show the list.

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

    Note: A basic knowledge about WP Query is needed to query posts.
    https://developer.wordpress.org/reference/classes/wp_query/

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