Astra_Loop::loop_markup( boolean $is_page = false )

Template part loop


Description


Parameters

$is_page

(boolean) (Optional) Loop outputs different content action for content page and default content. if is_page is set to true - do_action( 'astra_page_template_parts_content' ); is added if is_page is false - do_action( 'astra_template_parts_content' ); is added.

Default value: false


Return

(void)


Source

File: inc/class-astra-loop.php

		public function loop_markup( $is_page = false ) {
			?>
			<main id="main" class="site-main">
				<?php 
				if ( have_posts() ) :
					do_action( 'astra_template_parts_content_top' );

					while ( have_posts() ) :
						the_post();

						if ( true === $is_page ) {
							do_action( 'astra_page_template_parts_content' );
						} else {
							do_action( 'astra_template_parts_content' );
						}

						endwhile;
					do_action( 'astra_template_parts_content_bottom' );
					else :
						do_action( 'astra_template_parts_content_none' );
					endif; 
					?>
			</main><!-- #main -->
			<?php
		}

Changelog

Changelog
Version Description
1.2.7 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.