Skip to main content


public function get_footer_markup()

This method is used to return footer markup, as well as all of the page's scripts and modal markup (unless init_page() was called with the $standalone argument passed as true), when building layouts directly inside theme template files, and should only be used after the init_page() method has been called.


This method accepts no arguments.


If the $standalone argument was passed as false to init_page() (or no value was specified), this method will return anything added to the class' $html property by the build_footer() method, as well as any markup added to the $scripts and $modal properties by build_header() or by any component generated using the build_component() method. If $standalone was passed as true, all markup added to the $html, $scripts, and $modals properties by build_footer() will be returned.


Below is a basic example of a page template built using get_footer_markup():

Template Name: My Custom Page Template
$layout = new MethodThemeLayout;
$layout->init_page( $post->ID );
echo $layout->get_header_markup();
if ( have_posts() ) {
while ( have_posts() ) {
echo '
<div class="method-page-content">
<div class="container-fluid ' . method_get_class( 'full_width_container' ) . '">
<div class="row justify-content-center">
<div class="' . method_get_class( 'full_width_outer_col' ) . '">
echo '
} // end while
} // end if
echo $layout->get_footer_markup();