Making WordPress.org


Ignore:
Timestamp:
04/20/2017 12:48:20 AM (8 years ago)
Author:
SergeyBiryukov
Message:

Support Theme: Provide more flexibility in page templates:

  • Use default page.php template for simple one-column content.
  • Keep page-forums-sidebar.php template for forum-related pages.
  • Add page-full-width.php template for wider content with in-page navigation.

Fixes #2574.

File:
1 copied

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/page-full-width.php

    r5356 r5382  
    11<?php
    22/**
    3  * The template for displaying all pages.
     3 * Template Name: Full-width Page
    44 *
    5  * This is the template that displays all pages by default.
    6  * Please note that this is the WordPress construct of pages
    7  * and that other 'pages' on your WordPress site will use a
    8  * different template.
    9  *
     5 * @package WPBBP
    106 */
    117
    128get_header(); ?>
    139
    14 <main id="main" class="site-main" role="main">
     10    <main id="main" class="site-main page-full-width" role="main">
    1511
    16     <div class="entry-content">
    17         <?php bbp_breadcrumb(); ?>
     12        <?php
     13        while ( have_posts() ) : the_post();
    1814
    19         <?php while ( have_posts() ) : the_post(); ?>
     15            get_template_part( 'template-parts/content', 'page' );
     16        endwhile; // End of the loop.
     17        ?>
    2018
    21             <header class="page-header">
    22                 <h1 class="page-title"><?php the_title(); ?></h1>
    23             </header><!-- .page-header -->
     19    </main><!-- #main -->
    2420
    25             <?php the_content(); ?>
    26 
    27         <?php endwhile; ?>
    28     </div>
    29 
    30 </main>
    31 
    32 <?php get_footer(); ?>
     21<?php
     22get_footer();
Note: See TracChangeset for help on using the changeset viewer.