# Mount Points (Pro)

### How to use it

[Add a new Layout](https://wplake.gitbook.io/advanced-views/getting-started/introduction/creating-your-first-layout) 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 *Layout*, 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](https://wplake.gitbook.io/advanced-views/shortcode-attributes) field add available arguments to your shortcode to [restrict visibility](https://wplake.gitbook.io/advanced-views/shortcode-attributes/common-arguments) or to [define another object id](https://wplake.gitbook.io/advanced-views/shortcode-attributes/layout-shortcode#from-another-source).

{% hint style="warning" %}
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.&#x20;
{% endhint %}

### 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.

<pre class="language-php" data-overflow="wrap"><code class="lang-php"><strong>&#x3C;?php
</strong><strong>// even if your template is designed for a single page/CPT item
</strong><strong>// you must use the loop, it's the default WordPress way 
</strong><strong>// (see default themes, like twentytwenty) 
</strong><strong>while ( have_posts() ) {
</strong><strong>    // it's a part of the loop, this call 'loads' data about the current post/CPT item
</strong>    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
}
</code></pre>
