Home / Files / front-page.php


Lines: 1 to 62 of 62

<?php

/**
 * The front page template file
 *
 * If the user has selected a static page for their homepage, this is what will
 * appear.
 * Learn more: https://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage Twenty_Seventeen
 * @since 1.0
 * @version 1.0
 */

get_header(); ?>

<div id="primary" class="content-area">
	<main id="main" class="site-main" role="main">

		<?php
    // Show the selected front page content.
    if ( have_posts() ) :
      while ( have_posts() ) :
        the_post();
        get_template_part( 'template-parts/page/content', 'front-page' );
      endwhile;
    else :
      get_template_part( 'template-parts/post/content', 'none' );
    endif;
    ?>

		<?php
    // Get each of our panels and show the post data.
    if ( 0 !== twentyseventeen_panel_count() || is_customize_preview() ) : // If we have pages to show.

      
/**
 * Filter number of front page sections in Twenty Seventeen.
 *
 * @since Twenty Seventeen 1.0
 *
 * @param int $num_sections Number of front page sections.
 */
      $num_sections = apply_filters( 'twentyseventeen_front_page_sections', 4 );
      global $twentyseventeencounter;

      // Create a setting and control for each of the sections available in the theme.
      for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) {
        $twentyseventeencounter = $i;
        twentyseventeen_front_page_section( null, $i );
      }

  endif; // The if ( 0 !== twentyseventeen_panel_count() ) ends here.
    ?>

	</main><!-- #main -->
</div><!-- #primary -->

<?php
get_footer();
 

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      1 to 9 of 9

      • apply_filters() – Call the functions added to a filter hook.
      • get_footer() – Load footer template.
      • get_header() – Load header template.
      • get_template_part() – Load a template part into a template
      • have_posts() – Whether current WordPress query has results to loop over.
      • is_customize_preview() – Add an `is_customize_preview` function if it is missing.
      • the_post() – Iterate the post index in the loop.
      • twentyseventeen_front_page_section() – Display a front page section.
      • twentyseventeen_panel_count() – Count our number of active panels.

      Call hooks

      1 to 1 of 1

      • twentyseventeen_front_page_sections – filter
      File name: front-page.php
      Plugin ref: Twenty Seventeen
      Version: 2.0
      Deprecated?: No
      API Letters: F,P

      Published: 13th March 2017 | Last updated: 11th January 2019

      Information

      File name: front-page.php
      Plugin ref: Twenty Seventeen
      Version: 2.0
      Deprecated?: No
      API Letters: F,P

      • Plugins
      • Themes
      • Shortcodes
      • APIs
      • Files
      • Hooks
      • Classes
      • Home
      • Sites
      • Sitemap
      • Blog
      oik-plugins WordPress a2z
      WordPress Dynamic API Reference

      Site:  wp-a2z.org
      © Copyright oik-plugins 2014-2019. All rights reserved.


      Website designed and developed by Herb Miller
      Proudly powered by WordPress and oik plugins