|
/ Documentation /Frequently Asked Questions/ 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!

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

On this page
Scroll to Top