Call wp_head(); in MB View

Support MB Views Call wp_head(); in MB ViewResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #36744
    JohnJohn
    Participant

    Is it possible to call wp_head() in a Metabox view?

    <?php
    wp_head();
    ?>

    I have a theme with a front-page.php where I basically do this:

    <?php
    wp_head();
    ?>

    <?php echo do_shortcode( '[mbv name="front-page"]' ); ?>

    <?php
    wp_footer();
    ?>

    I was wondering if this could all be consolidated inside MB views instead of calling up front-page.php through the theme?

    #36757
    Long NguyenLong Nguyen
    Moderator

    Hi John,

    If you want to include the header in the view, please use the WP function get_header()

    {{ mb.get_header() }}

    In the view settings, please select the option "Render for: The whole page layout, including header and footer"

    #36782
    JohnJohn
    Participant

    Awesome, Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.