This repository has been archived by the owner on May 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
loop-page.php
88 lines (75 loc) · 3.09 KB
/
loop-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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
/**
* The loop that displays a page.
*
* The loop displays the posts and the post content. See
* http://codex.wordpress.org/The_Loop to understand it and
* http://codex.wordpress.org/Template_Tags to understand
* the tags used in it.
*
* This can be overridden in child themes with loop-page.php.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.2
*/
?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( is_front_page() ) { ?>
<h2 class="entry-title rublog-title--post"><?php the_title(); ?></h2>
<?php } else { ?>
<h1 class="entry-title rublog-title--page"><?php the_title(); ?></h1>
<?php } ?>
<div id="post-top-widget" class="widget-area" role="complementary" style="margin-top:-24px;">
<ul class="xoxo">
<?php dynamic_sidebar( 'translate-widget-area' ); ?>
</ul>
</div>
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'myblog' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php
// Entry Meta
get_template_part( '_entry-utility');
// Ads
if(!isset($custom_fields['ad-free'])) {
get_template_part( 'ad_google' );
}
// Entry Share
get_template_part( '_entry-share');
?>
<?php
// Tweet ideas
if(isset($custom_fields['twitter_idea']) && !empty($custom_fields['twitter_idea'])) {
echo '<div class="rublog-widget--social-tweet"><h5 class="rublog-title--widget">Идеи для твитов:</h5><div class="rublog-widget__content"><ul>';
for($i=0; $i < count($custom_fields['twitter_idea']); $i++) {
echo '<li><a class="twitter-share-button rublog-widget__cta" data-count="none" data-text="'.$custom_fields['twitter_idea'][$i].'" data-via="Bielousov" rel="nofollow"></a>'
.'«'.$custom_fields['twitter_idea'][$i].'»'
.'</li>';
}
echo '</ul></div></div>';
echo '<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>';
}
?>
<?php
// Errors notification
if(strlen(strip_tags(strip_shortcodes(get_the_content()))) > 100) {
echo '<div id="typo-notification" class="sans-serif">'
.'<h5 class="rublog-title--widget">Нашли ошибку?</h5>'.
error_notification_action_text()
.'</div>';
}
?>
</article><!-- #post-## -->
<!-- Wrap Container Flow -->
</div><!-- #content -->
</div><!-- #container -->
</div><!-- #main -->
<div id="main-related" class="x-post-comments">
<div class="content">
<!-- Wrap Container Flow End -->
<?php comments_template( '', true ); ?>
<?php zemanta_related_posts()?>
<?php endwhile; // end of the loop. ?>