- Installing SureDash
- Download and Access Your SureDash License
- Updating SureDash
- Understanding Spaces and Space Groups in SureDash
- Add a Space Content Type in SureDash
- How to Set Up a SureDash Course Space
- How to Set Up Google Login in SureDash: A Step-by-Step Guide
- How to Set Up Facebook Login in SureDash: A Step-by-Step Guide
- Understanding the Customize Portal in SureDash
- How To Add a Logo To The SureDash Portal
- Setting up Space Groups
- Hidden Spaces in SureDash
- How to Create a Feed Space
- How to Set up “Course” space in SureDash?
- How to Create a “Discussion” Space in SureDash
- How To Set Up A Private Discussion Space In SureDash
- Creating a “Single Post/Page” Space in SureDash
- How to Set Up a “Link” Space in SureDash
- How to Configure SureDash Space Layouts
- Understanding the “Single Post/Page” Space Type in SureDash
- How to Regenerate the Default SureDash Pages
- Recommended Hosting for SureDash
- Customizing the Portal Slug Using a Filter
- How to Edit SureDash Space or Post with Any Page Builder
- How to Use the Profile URLs in SureDash
- How to Manage Navigation Sidebar Top Sticky Offset in SureDash
- Custom Classes Used in Site Editor and Their Purpose
- How to Reset the Portal Template in SureDash?
- Media Handling in the Resource Library
- Location Where Users Can View Their Accessed Resources in SureDash
- Recommended Image Sizes for SureDash
- Metabox Field Values Not Displaying Inside SureDash Portal
Metabox Field Values Not Displaying Inside SureDash Portal
When using Metabox fields within Beaver Builder layouts, field values may appear correctly on standard WordPress pages but show up empty or stripped when viewed within the SureDash portal.
Why This Happens
In WordPress, every page load runs in the context of a main query — this determines which post (and its associated metadata) WordPress considers the “current” post.
When you load a post or its metadata directly (for example, when visiting a normal page or rendering a shortcode tied to that post), WordPress recognizes the correct context and loads all content and metadata properly.
However, when you embed one post inside another, such as:
- A page (A) embedding another post (B)
- Or post (B) itself loading dynamic content from another source (C)
WordPress still uses the outer post’s main query (A), not the embedded one (B or C). As a result, dynamic content that relies on metadata, shortcodes, or custom field contexts—like Metabox data—fails to load properly inside the nested structure.
This issue becomes more noticeable within the SureDash environment since Spaces often embed or re-render WordPress content within portal frames or layouts. The original $wp_query context is not automatically switched for the nested content.
Example Scenario
If a course page built using Beaver Builder pulls in a custom “instructor” field from Metabox, it will display correctly when viewed on yoursite.com/course/introduction.
But when the same course is inserted into a SureDash Space, that field may appear empty inside the portal because it’s being rendered outside its native query.
Workaround
As a quick workaround, users can edit content directly within the SureDash Space instead of embedding the page or post through a shortcode.
Alternatively, developers familiar with WordPress’s query handling can manually switch the global context before rendering embedded content using code similar to:
phpglobal $wp_query;
$original_query = $wp_query;
$wp_query = new WP_Query( array( 'p' => $post_id ) );
// render your inner post content here
$wp_query = $original_query;
wp_reset_postdata();
This temporarily sets the correct post context before outputting the content, ensuring Metabox fields and dynamic shortcodes behave as expected.
Conclusion
If your Metabox field values are missing inside the SureDash portal, it’s almost always due to the post context not being set up correctly when embedding content. Try editing directly in the Space editor to avoid this issue, or use the suggested workaround if you’re comfortable with code.
Still stuck? Our support team is happy to help—reach out anytime!
We don't respond to the article feedback, we use it to improve our support content.