Skip to content

Post Selector Control

Select posts from your WordPress site. Pro feature.

OptionTypeDefaultDescription
labelstring-Field label
controlstringpost-selectorControl type
postTypestringpostPost type to select from
postStatusstringpublishPost status filter
Post TypeDescription
postBlog posts
pagePages
productWooCommerce products
CustomAny registered post type
{
"attributes": {
"featuredPost": {
"type": "number",
"default": 0,
"wbs": {
"label": "Featured Post",
"control": "post-selector",
"postType": "post",
"postStatus": "publish"
}
}
}
}
{% set post = Post(attributes.featuredPost) %}
{% if post %}
<article class="featured-post">
<h2>{{ post.title }}</h2>
<div class="post-excerpt">{{ post.excerpt }}</div>
<a href="{{ post.link }}">Read More</a>
</article>
{% endif %}

Use Post Selector for featured posts, related content, or any dynamic content that references other posts.

The Post Selector control is only available in WPBits Block Studio Pro. See Pro Features for more information.