Skip to content

Commit 7644ae9

Browse files
committed
plugins theme: Added single.php and content-single.php
1 parent 0c9381b commit 7644ae9

File tree

2 files changed

+89
-0
lines changed

2 files changed

+89
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?php
2+
/**
3+
* The template for displaying content in the single.php template
4+
*
5+
* @package WordPress
6+
* @subpackage Twenty_Eleven
7+
* @since Twenty Eleven 1.0
8+
*/
9+
?>
10+
11+
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
12+
<header class="entry-header">
13+
<h1 class="entry-title"><?php the_title(); ?></h1>
14+
</header><!-- .entry-header -->
15+
16+
<div class="entry-content">
17+
<?php the_content(); ?>
18+
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
19+
</div><!-- .entry-content -->
20+
21+
<footer class="entry-meta">
22+
<?php
23+
/* translators: used between list items, there is a space after the comma */
24+
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
25+
26+
/* translators: used between list items, there is a space after the comma */
27+
$tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
28+
if ( '' != $tag_list ) {
29+
$utility_text = __( 'This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
30+
} elseif ( '' != $categories_list ) {
31+
$utility_text = __( 'This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
32+
} else {
33+
$utility_text = __( 'This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
34+
}
35+
36+
printf(
37+
$utility_text,
38+
$categories_list,
39+
$tag_list,
40+
esc_url( get_permalink() ),
41+
the_title_attribute( 'echo=0' ),
42+
get_the_author(),
43+
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )
44+
);
45+
?>
46+
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
47+
48+
<?php if ( get_the_author_meta( 'description' ) && is_multi_author() ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries ?>
49+
<div id="author-info">
50+
<div id="author-avatar">
51+
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 68 ) ); ?>
52+
</div><!-- #author-avatar -->
53+
<div id="author-description">
54+
<h2><?php printf( esc_attr__( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
55+
<?php the_author_meta( 'description' ); ?>
56+
<div id="author-link">
57+
<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
58+
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyeleven' ), get_the_author() ); ?>
59+
</a>
60+
</div><!-- #author-link -->
61+
</div><!-- #author-description -->
62+
</div><!-- #entry-author-info -->
63+
<?php endif; ?>
64+
</footer><!-- .entry-meta -->
65+
</article><!-- #post-<?php the_ID(); ?> -->

themes/plugins-jquery-com/single.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
/**
3+
* The Template for displaying all single posts.
4+
*
5+
* @package WordPress
6+
* @subpackage Twenty_Eleven
7+
* @since Twenty Eleven 1.0
8+
*/
9+
10+
get_header(); ?>
11+
12+
<div id="body" class="clearfix">
13+
<div class="inner" role="main">
14+
15+
<?php while ( have_posts() ) : the_post(); ?>
16+
17+
<?php get_template_part( 'content', 'single' ); ?>
18+
19+
<?php endwhile; // end of the loop. ?>
20+
21+
</div><!-- .inner -->
22+
</div><!-- #body -->
23+
24+
<?php get_footer(); ?>

0 commit comments

Comments
 (0)