Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Templating changes... #1098

Merged
merged 3 commits into from
Oct 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@

get_header(); ?>

<div class="main-wrap" role="main">
<article <?php post_class('main-content') ?> id="post-<?php the_ID(); ?>">
<header>
<h1 class="entry-title"><?php _e( 'File Not Found', 'foundationpress' ); ?></h1>
</header>
<div class="entry-content">
<div class="error">
<p class="bottom"><?php _e( 'The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.', 'foundationpress' ); ?></p>
<div class="main-wrap">
<main class="main-content">
<article>
<header>
<h1 class="entry-title"><?php _e( 'File Not Found', 'foundationpress' ); ?></h1>
</header>
<div class="entry-content">
<div class="error">
<p class="bottom"><?php _e( 'The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.', 'foundationpress' ); ?></p>
</div>
<p><?php _e( 'Please try the following:', 'foundationpress' ); ?></p>
<ul>
<li><?php _e( 'Check your spelling', 'foundationpress' ); ?></li>
<li>
<?php
/* translators: %s: home page url */
printf( __(
'Return to the <a href="%s">home page</a>', 'foundationpress' ),
home_url()
);
?>
</li>
<li><?php _e( 'Click the <a href="javascript:history.back()">Back</a> button', 'foundationpress' ); ?></li>
</ul>
</div>
<p><?php _e( 'Please try the following:', 'foundationpress' ); ?></p>
<ul>
<li><?php _e( 'Check your spelling', 'foundationpress' ); ?></li>
<li>
<?php
/* translators: %s: home page url */
printf( __(
'Return to the <a href="%s">home page</a>', 'foundationpress' ),
home_url()
);
?>
</li>
<li><?php _e( 'Click the <a href="javascript:history.back()">Back</a> button', 'foundationpress' ); ?></li>
</ul>
</div>
</article>

</article>
</main>
<?php get_sidebar(); ?>

</div>

<?php get_footer();
6 changes: 3 additions & 3 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

get_header(); ?>

<div class="main-wrap" role="main">
<article class="main-content">
<div class="main-wrap">
<main class="main-content">
<?php if ( have_posts() ) : ?>

<?php /* Start the Loop */ ?>
Expand All @@ -43,7 +43,7 @@
</nav>
<?php endif; ?>

</article>
</main>
<?php get_sidebar(); ?>

</div>
Expand Down
2 changes: 1 addition & 1 deletion footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

?>

</section>
</div><!-- Close container -->
<div class="footer-container" data-sticky-footer>
<footer class="footer">
<?php do_action( 'foundationpress_before_footer' ); ?>
Expand Down
2 changes: 1 addition & 1 deletion header.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@

</header>

<section class="container">
<div class="container">
<?php do_action( 'foundationpress_after_header' );
6 changes: 3 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

get_header(); ?>

<div class="main-wrap" role="main">
<article class="main-content">
<div class="main-wrap">
<main class="main-content">
<?php if ( have_posts() ) : ?>

<?php /* Start the Loop */ ?>
Expand All @@ -41,7 +41,7 @@
</nav>
<?php endif; ?>

</article>
</main>
<?php get_sidebar(); ?>

</div>
Expand Down
2 changes: 0 additions & 2 deletions library/theme-support.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ function foundationpress_theme_support() {
// Add post formats support: http://codex.wordpress.org/Post_Formats
add_theme_support( 'post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat') );

// Declare WooCommerce support per http://docs.woothemes.com/document/third-party-custom-theme-compatibility/
add_theme_support( 'woocommerce' );
// Additional theme support for woocommerce 3.0.+
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
Expand Down
43 changes: 11 additions & 32 deletions page-templates/page-full-width.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,16 @@

<?php get_template_part( 'template-parts/featured-image' ); ?>

<div class="main-wrap full-width" role="main">

<?php do_action( 'foundationpress_before_content' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<article <?php post_class('main-content') ?> id="post-<?php the_ID(); ?>">
<header>
<h1 class="entry-title"><?php the_title(); ?></h1>
</header>
<?php do_action( 'foundationpress_page_before_entry_content' ); ?>
<div class="entry-content">
<?php the_content(); ?>
</div>
<footer>
<?php
wp_link_pages(
array(
'before' => '<nav id="page-nav"><p>' . __( 'Pages:', 'foundationpress' ),
'after' => '</p></nav>',
)
);
?>
<p><?php the_tags(); ?></p>
</footer>
<?php do_action( 'foundationpress_page_before_comments' ); ?>
<?php comments_template(); ?>
<?php do_action( 'foundationpress_page_after_comments' ); ?>
</article>
<?php endwhile;?>

<?php do_action( 'foundationpress_after_content' ); ?>

<div class="main-wrap full-width">
<main class="main-content">
<?php do_action( 'foundationpress_before_content' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'template-parts/content', 'page' ); ?>
<?php do_action( 'foundationpress_page_before_comments' ); ?>
<?php comments_template(); ?>
<?php do_action( 'foundationpress_page_after_comments' ); ?>
<?php endwhile;?>
<?php do_action( 'foundationpress_after_content' ); ?>
</main>
</div>

<?php get_footer();
43 changes: 11 additions & 32 deletions page-templates/page-sidebar-left.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,17 @@

<?php get_template_part( 'template-parts/featured-image' ); ?>

<div class="main-wrap sidebar-left" role="main">

<?php do_action( 'foundationpress_before_content' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<article <?php post_class('main-content') ?> id="post-<?php the_ID(); ?>">
<header>
<h1 class="entry-title"><?php the_title(); ?></h1>
</header>
<?php do_action( 'foundationpress_page_before_entry_content' ); ?>
<div class="entry-content">
<?php the_content(); ?>
</div>
<footer>
<?php
wp_link_pages(
array(
'before' => '<nav id="page-nav"><p>' . __( 'Pages:', 'foundationpress' ),
'after' => '</p></nav>',
)
);
?>
<p><?php the_tags(); ?></p>
</footer>
<?php do_action( 'foundationpress_page_before_comments' ); ?>
<?php comments_template(); ?>
<?php do_action( 'foundationpress_page_after_comments' ); ?>
</article>
<?php endwhile;?>

<?php do_action( 'foundationpress_after_content' ); ?>
<div class="main-wrap sidebar-left">
<main class="main-content">
<?php do_action( 'foundationpress_before_content' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'template-parts/content', 'page' ); ?>
<?php do_action( 'foundationpress_page_before_comments' ); ?>
<?php comments_template(); ?>
<?php do_action( 'foundationpress_page_after_comments' ); ?>
<?php endwhile;?>
<?php do_action( 'foundationpress_after_content' ); ?>
</main>
<?php get_sidebar(); ?>

</div>

<?php get_footer();
44 changes: 11 additions & 33 deletions page.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,17 @@

<?php get_template_part( 'template-parts/featured-image' ); ?>

<div class="main-wrap" role="main">

<?php do_action( 'foundationpress_before_content' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<article <?php post_class('main-content') ?> id="post-<?php the_ID(); ?>">
<header>
<h1 class="entry-title"><?php the_title(); ?></h1>
</header>
<?php do_action( 'foundationpress_page_before_entry_content' ); ?>
<div class="entry-content">
<?php the_content(); ?>
<?php edit_post_link( __( '(Edit)', 'foundationpress' ), '<span class="edit-link">', '</span>' ); ?>
</div>
<footer>
<?php
wp_link_pages(
array(
'before' => '<nav id="page-nav"><p>' . __( 'Pages:', 'foundationpress' ),
'after' => '</p></nav>',
)
);
?>
<p><?php the_tags(); ?></p>
</footer>
<?php do_action( 'foundationpress_page_before_comments' ); ?>
<?php comments_template(); ?>
<?php do_action( 'foundationpress_page_after_comments' ); ?>
</article>
<?php endwhile;?>

<?php do_action( 'foundationpress_after_content' ); ?>
<div class="main-wrap">
<main class="main-content">
<?php do_action( 'foundationpress_before_content' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'template-parts/content', 'page' ); ?>
<?php do_action( 'foundationpress_page_before_comments' ); ?>
<?php comments_template(); ?>
<?php do_action( 'foundationpress_page_after_comments' ); ?>
<?php endwhile;?>
<?php do_action( 'foundationpress_after_content' ); ?>
</main>
<?php get_sidebar(); ?>

</div>

<?php get_footer();
15 changes: 6 additions & 9 deletions search.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@

get_header(); ?>

<div class="main-wrap" role="main">
<div class="main-wrap">
<main id="search-results" class="main-content">
<?php do_action( 'foundationpress_before_content' ); ?>

<?php do_action( 'foundationpress_before_content' ); ?>

<article <?php post_class('main-content') ?> id="search-results">
<header>
<h1 class="entry-title"><?php _e( 'Search Results for', 'foundationpress' ); ?> "<?php echo get_search_query(); ?>"</h1>
</header>
Expand All @@ -35,16 +34,14 @@
foundationpress_pagination();
elseif ( is_paged() ) :
?>

<nav id="post-nav">
<div class="post-previous"><?php next_posts_link( __( '&larr; Older posts', 'foundationpress' ) ); ?></div>
<div class="post-next"><?php previous_posts_link( __( 'Newer posts &rarr;', 'foundationpress' ) ); ?></div>
</nav>
<?php endif; ?>

</article>

<?php do_action( 'foundationpress_after_content' ); ?>

<?php do_action( 'foundationpress_after_content' ); ?>
</main>
<?php get_sidebar(); ?>

</div>
Expand Down
45 changes: 12 additions & 33 deletions single.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,18 @@

<?php get_template_part( 'template-parts/featured-image' ); ?>

<div class="main-wrap" role="main">

<?php do_action( 'foundationpress_before_content' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<article <?php post_class('main-content') ?> id="post-<?php the_ID(); ?>">
<header>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php foundationpress_entry_meta(); ?>
</header>
<?php do_action( 'foundationpress_post_before_entry_content' ); ?>
<div class="entry-content">
<?php the_content(); ?>
<?php edit_post_link( __( '(Edit)', 'foundationpress' ), '<span class="edit-link">', '</span>' ); ?>
</div>
<footer>
<?php
wp_link_pages(
array(
'before' => '<nav id="page-nav"><p>' . __( 'Pages:', 'foundationpress' ),
'after' => '</p></nav>',
)
);
?>
<p><?php the_tags(); ?></p>
</footer>
<?php the_post_navigation(); ?>
<?php do_action( 'foundationpress_post_before_comments' ); ?>
<?php comments_template(); ?>
<?php do_action( 'foundationpress_post_after_comments' ); ?>
</article>
<?php endwhile;?>

<?php do_action( 'foundationpress_after_content' ); ?>
<div class="main-wrap">
<main class="main-content">
<?php do_action( 'foundationpress_before_content' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'template-parts/content', '' ); ?>
<?php the_post_navigation(); ?>
<?php do_action( 'foundationpress_post_before_comments' ); ?>
<?php comments_template(); ?>
<?php do_action( 'foundationpress_post_after_comments' ); ?>
<?php endwhile;?>
<?php do_action( 'foundationpress_after_content' ); ?>
</main>
<?php get_sidebar(); ?>
</div>
<?php get_footer();
32 changes: 32 additions & 0 deletions template-parts/content-page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
/**
* The default template for displaying page content
*
*
* @package FoundationPress
* @since FoundationPress 1.0.0
*/

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header>
<h1 class="entry-title"><?php the_title(); ?></h1>
</header>
<?php do_action( 'foundationpress_page_before_entry_content' ); ?>
<div class="entry-content">
<?php the_content(); ?>
<?php edit_post_link( __( '(Edit)', 'foundationpress' ), '<span class="edit-link">', '</span>' ); ?>
</div>
<footer>
<?php
wp_link_pages(
array(
'before' => '<nav id="page-nav"><p>' . __( 'Pages:', 'foundationpress' ),
'after' => '</p></nav>',
)
);
?>
<?php $tag = get_the_tags(); if ( $tag ) { ?><p><?php the_tags(); ?></p><?php } ?>
</footer>
</article>
Loading