-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfront-page.php
50 lines (38 loc) · 1.4 KB
/
front-page.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/*
Template NECN: Front Page
*/
?>
<?php get_header(); ?>
<!-- start front-page slider -->
<?php
display_metaslider_by_slug(); //functions.php
?>
<!-- end front-page slider -->
<!-- start content -->
<div class="content-area">
<!-- start posts -->
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php the_content(''); ?>
<?php endwhile; endif; ?>
<!-- end this loop -->
<!-- start second loop show latest 3 posts-->
<?php rewind_posts(); //stop the first loop ?>
<?php query_posts('showposts=3'); //show latest 3 posts ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<article class="article-post">
<h2 id="post-<?php the_ID(); ?>" class="post-title">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
</h2>
<?php the_excerpt(); ?><a href="<?php the_permalink() ?>">Read More »</a>
<p><small>Posted by <?php the_author(); ?> in <?php the_category(', ') ?></small></p>
</article>
<?php endwhile; ?>
<?php endif; ?>
<!-- end second loop of posts -->
<?php wp_link_pages(); ?>
</div>
<!-- start right page sidebar -->
<?php get_sidebar(); ?>
<!-- end right page sidebar -->
<?php get_footer(); ?>