Skip to content

Commit

Permalink
Amend front page
Browse files Browse the repository at this point in the history
  • Loading branch information
portableant authored Oct 28, 2017
1 parent 52a308e commit cb46e05
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions micropasts/front-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="top-container"></div>

<div class="row jumbotron">
<div class="col-md-12 mainpage">
<!-- <div class="col-md-12 mainpage">
<p><h1>MicroPasts</h1></p>
<p><h3>A community platform for conducting, designing and funding research into our human past.</h3></p>
<img src="http://micropasts.org/wp-content/uploads/2014/05/figurines_800px.png" class="figurines">
Expand All @@ -27,11 +27,38 @@
<h3>Discuss and design</h3>
<p>Discuss existing research projects or design new ones on our community forum.</p>
<p><a class="btn btn-primary" href="http://community.micropasts.org/">View details <i class="fa fa-chevron-right"></i></a></p>
</div>
</div> -->

<?php
$postlist = get_posts( 'orderby=menu_order&sort_order=asc' );
$posts = array();
foreach ( $postlist as $post ) {
$posts[] += $post->ID;
}

$current = array_search( get_the_ID(), $posts );
$prevID = $posts[$current-1];
$nextID = $posts[$current+1];
?>

<div class="navigation">
<?php if ( !empty( $prevID ) ): ?>
<div class="alignleft">
<a href="<?php echo get_permalink( $prevID ); ?>"
title="<?php echo get_the_title( $prevID ); ?>">Previous</a>
</div>
<?php endif;
if ( !empty( $nextID ) ): ?>
<div class="alignright">
<a href="<?php echo get_permalink( $nextID ); ?>"
title="<?php echo get_the_title( $nextID ); ?>">Next</a>
</div>
<?php endif; ?>
</div><!-- .navigation -->
</div>

</div>
<div class="home-push"></div>
</div>

<?php get_footer(); ?>
<?php get_footer(); ?>

0 comments on commit cb46e05

Please sign in to comment.