-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
96 lines (88 loc) · 4.72 KB
/
index.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
89
90
91
92
93
94
95
<?php get_header();
global $options;
foreach ($options as $value) {
if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
}
?>
<div class="left"><!--left-->
<?php
$Catid = get_cat_id(''. $MagZ_main_section .'');
$Featid = get_cat_id(''. $MagZ_feat_section .'');
query_posts('showposts=2&cat=-' . $Catid . ',-' . $Featid . '');
if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
<div class="post"><!--post-->
<div class="category"><?php the_category(', ') ?></div>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Read more on <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<div class="author"><em>By</em>: <strong><?php the_author() ?></strong></div>
<hr />
<p>
<?php //the_content_rss('', TRUE, '', 80); ?>
<?php the_excerpt()?>
</p>
</div><!--post-->
<?php endwhile; ?><?php endif; ?>
<div class="featured">
<h2>存档</h2>
<?php
query_posts('showposts=' . $MagZ_archive_section_num .'&offset=3&cat=-' . $Catid . '');
if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
<div class="list">
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Read more on <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<div class="category"><?php the_category(', ') ?></div>
</div>
<?php endwhile; ?><?php endif; ?>
</div>
</div><!--left-->
<div class="right"><!--right-->
<div class="focus">
<img src="<?php bloginfo(template_url);?>/images/banner.jpg" width="658" height="246" />
</div>
<div class="main"><!--main-->
<?php query_posts('showposts=' . $MagZ_main_section_num . '&cat=' . $Catid . '');
if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
<div class="post"><!--post-->
<div class="category"><?php the_category(', '); ?></div>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Read more on <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<div class="author"><em>By</em>: <strong><?php the_author() ?></strong></div>
<hr />
<p>
<?php //the_content_rss('', TRUE, '', 140); ?>
<?php the_excerpt()?>
</p>
</div><!--post-->
<?php endwhile; ?><?php endif; ?>
<div class="featured">
<h2><?php echo $MagZ_feat_section ?></h2>
<?php query_posts('showposts=' . $MagZ_feat_section_num . '&cat=' . $Featid . '');
if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
<div class="list">
<div class="thumb">
<?php
if (function_exists('gi_thumbnail')) {
echo gi_thumbnail();
}
else {
$images =& get_children( 'post_type=attachment&post_mime_type=image&post_parent=' . $post->ID );
$firstImageSrc = wp_get_attachment_image_src(array_shift(array_keys($images)));
echo "<img src=\"{$firstImageSrc[0]}\" width=\"50\" height=\"50\" />";
}
?>
</div>
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Read more on <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<div class="category"><?php the_category(', '); ?></div>
<div class="ffix"></div>
</div>
<?php endwhile; ?><?php endif; ?>
</div>
</div><!--main-->
<div class="sidebar">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('home widget') ) : ?>
<li id="about">
<h2>Widget Area</h2>
<p>This is widget area, add your widget here from your widget on appereance on your admin panel</p>
</li>
<?php endif; ?>
</div>
</div><!--right-->
<div class="ffix"></div>
<?php get_footer(); ?>