Skip to content

Commit

Permalink
Page Template Added
Browse files Browse the repository at this point in the history
  • Loading branch information
cogdog committed Oct 14, 2017
1 parent 26ccc60 commit 0d812ab
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 6 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ Big Picture works best for smaller amounts of content in each section, it's mean
* Laura Killam Dossier http://dossier.nursekillam.com/
* Aaron Davis http://home.readwriterespond.com/



## Installing from Scratch

Install this theme on any self hosted Wordpress site. No luck on Wordpress.com, get a real web hosting package.
Expand Down Expand Up @@ -212,6 +210,7 @@ If you ever need to edit the Gallery (e.g. change the images), revert the name o
* v0.1 (Sep 3, 2017) First release, for the brave, the few, the daring.
* v0.2 (Sep 5, 2017) Added template for single post view and support for **Read More** tags to separate content for front page excerpt and provide a space for more content in a single post view. Removed center alignment for primary content. Added home link to blog title in top left.
* v0.3 (Oct 11, 2017) Small styling improvements- outline title text, bigger text below, added transparency to the sliding box overlays
* v0.3 (Oct 13, 2017) Added template for standalone Wordpress Page.

### Requests

Expand Down
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ function bigpicture_register_theme_customizer( $wp_customize ) {

// Add setting for front text
$wp_customize->add_setting( 'intro_blurb_text', array(
'default' => __( 'I am a compelling blob of text. <strong>HTML</strong> is okay here.', 'bigpicture' ),
'default' => __( 'I am a compelling blob of text. <em>HTML</em> is okay here.', 'bigpicture' ),
'sanitize_callback' => 'bigpicture_nosanitize_text'
) );
// Add control for front text
Expand Down
2 changes: 1 addition & 1 deletion header.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#intro {
background: url('<?php echo get_stylesheet_directory_uri()?>/assets/images/overlay.png'), url("<?php header_image(); ?>");

<?php elseif ( is_single() ):?>
<?php elseif ( is_single() or is_page() ):?>

#top {
background: url('<?php echo get_stylesheet_directory_uri()?>/assets/images/overlay.png'), url("<?php echo get_the_post_thumbnail_url(); ?>");
Expand Down
85 changes: 85 additions & 0 deletions page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?php
get_header();

// keep a running list of the menu labels for intersection navigation
$menulist[] = sanitize_title( get_bigpicture_intro_menu_label() );

// custom query for posts listed by menu order

$the_query = new WP_Query(array(
'post_type' => 'post',
'post_status' => 'publish',
'orderby' => 'menu_order',
'order' => 'ASC',
'posts_per_page' => 10,
) );

// First Loop for the navigation
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {

$the_query->the_post();

// doth we have a string for the menu item?
$menu_label = get_post_meta( get_the_ID(), '_button_label', true );

// no, use the title, it will be ugly, but they should get the hint
if ( empty( $menu_label ) ) {
$menu_label = get_the_title();
}

// add to navigation mennu
echo '<li><a href="' . get_permalink() . '">' . $menu_label . '</a></li>';

// keep track for later use
$menulist[] = $menu_label;

} // while

echo '</ul></nav></header>';

} // $the_query->have_posts()
?>

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>


<?php if ( has_post_thumbnail() ) :?>


<section id="top" class="main style1 dark fullscreen">
<div class="content">
<header>
<h2><?php the_title(); ?></h2>
</header>

<footer>
<a href="#more" class="button style2 down">More</a>
</footer>
</div>
</section>

<?php endif?>

<section id="more" class="main style3 primary">
<div class="content">

<?php if ( !has_post_thumbnail() ) :?>
<header>
<h2><?php the_title(); ?></h2>
</header>
<?php endif?>

<?php the_content()?>

<?php edit_post_link('Edit This', '<p class="edit-this"><span class="fa fa-pencil-square-o" aria-hidden="true"></span> ', '</p>');?>

</div>

<a href="<?php echo site_url()?>" class="button style2 down anchored">Return</a>

</section>
<?php endwhile;?>
<?php endif; ?>

<?php get_footer(); ?>
2 changes: 1 addition & 1 deletion single.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<h2><?php the_title(); ?></h2>
</header>

<p><?php the_content('');?>
<?php the_content('');?>

<footer>
<a href="#more" class="button style2 down">More</a>
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Theme Name: WP Big Picture
Theme URI: http://github.com/cogdog/wp-bigpicture
Author: Alan Levine
Author URI: http://cog.dog
Version: 0.3
Version: 0.4
Description: A large image single page calling card site, based on HTML5 UP theme Big Pictuere by HTML5 UP
License: Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down

0 comments on commit 0d812ab

Please sign in to comment.