Mount Points (Pro)

Mount Points allow you to add a View to a location that doesn’t support shortcodes and places that usually require editing PHP templates.

How to use it

Add a new View and assign fields as usual.

Switch to the Mount Points tab.

Click on the Add Mount Point button.

In the Specific posts field select which posts to limit the mount point to.

Or instead use the Post Types field to limit the mount point to all posts of the same type.

Determine where you want to show your View, then add the Unique word, string or HTML piece to ‘Mount’ to using the Mount Point. If left empty the content will be used as a mount point.

In the Shortcode Arguments field add available arguments to your shortcode to restrict visibility or to define another object id.

Note: this feature uses 'the_content' theme hook, so mount points won't work if your theme or a specific template doesn't call it or calls it outside of the standard loop.

Custom theme template

If you’re going to create your own theme template, see below for a sample on the correct standard loop, you will have to use this as a basis in order for the Mount Points feature to work with pages that use your custom template files.

<?php
// even if your template is designed for a single page/CPT item
// you must use the loop, it's the default WordPress way 
// (see default themes, like twentytwenty) 
while ( have_posts() ) {
    // it's a part of the loop, this call 'loads' data about the current post/CPT item
    the_post();
    
    // content can be printed either using the 'the_content()' function
    the_content();
    
    // or can be get using the 'get_the_content()' function, 
    // but only along with the "apply_filters( 'the_content', $content )" call
    $content = get_the_content();
    $content = apply_filters( 'the_content', $content );
    
    // todo print post fields here
}

Last updated