-
Notifications
You must be signed in to change notification settings - Fork 1
/
news.php
executable file
·58 lines (43 loc) · 2.44 KB
/
news.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
51
52
53
54
55
56
57
58
<?php
/*
Template Name: News
*/
?>
<?php get_header(); ?>
<div id="content">
<div id="posts" class="grid_9">
<?php query_posts('post_type=post&post_status=publish&posts_per_page=10&paged='. get_query_var('paged')); ?>
<?php if( have_posts() ): ?>
<?php while( have_posts() ): the_post(); ?>
<div id="post-<?php get_the_ID(); ?>" <?php post_class(); ?>>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<span class="entry-meta"><small>Posted on: <?php the_time('l, F jS, Y') ?> in <?php the_category(', ') ?> by <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title=" by <?php echo get_the_author(); ?>"><?php the_author(); ?>
<a href="<?php the_author_meta('user_url' );?>"><?php the_author_meta('user_url' );?></a>
</small></span>
<div class="clear"></div>
<?php the_content(); ?>
<div id="authorbio"><h2>About the Author</h2><?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
<?php echo get_avatar( get_the_author_meta( 'user_email' ), 60 ); ?>
<?php the_author_meta( 'description' ); ?>
<a href="<?php the_author_meta('user_url' );?>"><?php the_author_meta('user_url' );?><h4>View all posts by <?php the_author(); ?> </h4></a>
<h3>Follow <?php the_author(); ?> on twitter</h3>
<a href="http://twitter.com/<?php the_author_meta('twitter' );?>"><?php the_author_meta('twitter' );?></a>
<?php endif; ?></div></br>
<span class="comments"><?php comments_popup_link(__('0 comments','example'),__('1 comment','example'),__('% comments','example')); ?></span>
</div><!-- /#post-<?php get_the_ID(); ?> -->
<hr class="grid_9"/>
<div class="clear"></div>
<?php endwhile; ?>
</div>
<?php get_sidebar(); ?>
<div class="grid_12"style="text-align:center;">
<?php posts_nav_link(' · ', 'previous page', 'next page'); ?>
</div>
<?php else: ?>
<div id="post-404" class="noposts">
<p><?php _e('None found.','example'); ?></p>
</div><!-- /#post-404 -->
<?php get_sidebar(); ?>
<?php endif; wp_reset_query(); ?>
<?php get_footer() ?>
</div><!-- /#content -->