,我做的一個站,有個模板,為什麼首頁不顯示,是不是出現什麼問題的呢?我網站是:http://www.healthprotections.com
) ^! g% I7 G+ _) Y# `* c* F" u* E3 h3 C1 l( @& ?( V" J* S
首頁代碼是:- <?php get_header(); ?>7 X, v/ B3 G3 B& }1 Y
- + D$ v( Z" s4 {- A. L
- <!-- content -->
1 R6 S5 C; z: L& V - <div class="content">
t8 S- z2 @% A/ V -
- q5 ~/ x0 B$ | - <?php if ( !function_exists('dynamic_sidebar')+ P F6 H2 D2 J& W* X1 m4 \. V
- || !dynamic_sidebar('Ad Position 2') ) : ?>
6 T: Q, N9 l- `3 H- J& w m, \% D3 P! Q - <?php endif; ?>; ^+ Q* \8 a' z. K4 D% f
-
1 b) i: Q: V# g' |& y* x) }) \9 \ - <!-- leftcontent -->
* J5 D/ C$ _7 z' y! E) r4 ^6 X - <div class="<?php if ( substr(of_get_option('site_layout'),-1) == 'l' ) { echo 'leftcontent-l'; } else { echo 'leftcontent';}?>">* H4 H( |( ~$ @8 N% j9 v: L
-
8 X5 R6 x3 h. K/ Z3 \ - <?php if ( !function_exists('dynamic_sidebar')
" |9 v, y) e+ z4 {9 C: U - || !dynamic_sidebar('Ad Position 3') ) : ?>$ y* u$ h: X6 C4 {' R$ h" N! I9 P
- <?php endif; ?>
* r. k1 u$ ^4 j6 G% d: `6 z9 _0 ~ -
) Q5 Z, T, V" I+ m2 _ - <?php if ( of_get_option('homeheading') <> "" ) { ?> 7 ~6 `2 w4 r) l' @8 j$ p7 t8 ?, L
- <h1 class="postmargin"><?php echo of_get_option('homeheading'); ?></h1>8 ]1 p2 N' x: R i9 h
- <?php } ?>1 W. |# v' _& ~
; v; M2 n6 v. R5 b5 p/ V& ` _- <?php if ( of_get_option('homeintro') <> "" ) { ?>+ t/ z, {( I8 K1 Y; w2 R8 r
- <div class="intro">5 X7 G4 K1 n0 t; t; H8 Y
-
* E3 w( \- I1 a. @ - <?php if ( !function_exists('dynamic_sidebar'); k8 `/ s% r' a. a! x
- || !dynamic_sidebar('Ad Position 5') ) : ?>
) J- i1 |( s6 o, C3 ^( ~2 a8 W, r - <?php endif; ?>
* a$ u- ]# t, `- `6 ~" } -
* H) V7 ~+ W/ |' Z I# F! q - <?php if ( !function_exists('dynamic_sidebar')
- Y* R. G# X2 r4 q K# k3 V - || !dynamic_sidebar('Ad Position 6') ) : ?>6 e1 g' g$ J+ I1 h+ v5 O8 j: R. o
- <?php endif; ?>: @6 F' |! k* f& @! r o: Y
- ( u. g8 E- P" G2 d$ f! A0 ?
- <?php if ( of_get_option('intro_image') <> "" ) { ?><?php if ( of_get_option('intro_image_url') <> "" ) { ?><a href="<?php echo of_get_option('intro_image_url'); ?>" rel="nofollow" target="_blank"><?php } ?><img src="<?php echo of_get_option('intro_image'); ?>" align="left" class="introimage" alt="<?php if(of_get_option('intro_image_alt')){ ?><?php echo of_get_option('intro_image_alt'); ?><?php } else { ?><?php bloginfo('name'); ?><?php } ?>"><?php if ( of_get_option('intro_image_url') <> "" ) { ?></a><?php } ?><?php } ?>
% c6 _# r2 o) v; O& ` - <?php echo stripslashes(of_get_option('homeintro')); ?>
9 \5 N1 m k; D5 H - </div>: G8 e' h( z, E: `
- <?php } ?>
, ^7 Z3 d8 c: W: F* \# x( N6 N -
" g6 R1 I7 t+ x- a& T7 } - <?php if ( !function_exists('dynamic_sidebar')/ N" P& @: g- E: n, n. _+ C
- || !dynamic_sidebar('Ad Position 7') ) : ?>' S1 O! V0 n8 H9 {! y" Y# b1 O
- <?php endif; ?>; t7 x4 A* k, P+ {0 q5 X& c
- . S# v% I8 q2 ]! E- D" j3 L5 m
- <?php if ( of_get_option('show_home_posts')) { ?>0 N7 O4 U B7 N& I' G
-
q, W9 q! P5 g( X7 i: f/ ~- z7 ] - <?php if ( of_get_option('categories_home') <> "" || of_get_option('home_posts') ) { ?>3 D' s+ k6 q9 X% f& k) S
- <?php $cattoinclude = of_get_option('categories_home'); ?>
2 @* S, K! Q1 T - <?php $homepostnumber = of_get_option('home_posts'); ?>
' }" }: r1 O$ R' d8 _% V! l$ } - <?php query_posts('cat='.$cattoinclude.'&showposts='.$homepostnumber); ?>
& ~ ?% ~% y, l& R+ u ~* D# u - <?php } ?>
% t9 Y% m# {& D0 g3 t/ U0 Y- V3 B - & `4 \4 m: k% [; L l
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>% `8 K7 X& _$ x
- 1 m9 _$ Q6 {0 x) `: {$ J7 i) Q8 b
- <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'med-thumb' ); ?>! {. [& h9 d6 b: I% w3 B
- <?php if ($image): ?>& a2 n7 `+ u5 r' G. r: E6 A
- ) H% c1 V! f5 g: [; Q" A0 s$ Z
- <!-- post -->/ \ _# Z9 T: S" p
- <div class="post">
: P! P" s8 \$ {" o% m - : U2 w4 C1 R1 V0 V
- <?php if ( of_get_option('home_excerpt')) { ?>
4 N. R9 \0 R- B9 p -
6 ]# s- P; L3 D, z* i - <h2<?php if(!of_get_option('showmeta')){ ?> class="postmargin"<?php } ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
3 {6 g6 U# ?1 [% B( [2 | - <?php if ( of_get_option('showmeta')) { ?>% z2 j/ l7 s6 F. U' E) V$ a( a# P
- <div class="post_meta">
$ g3 ?. T' q& P) e2 A- V. d$ U - <ul>, z# U# g5 `) D8 f8 o2 @4 k
- <li><?php the_time('M d, Y'); ?></li> \1 l C9 b" I% w) Q
- <li>|</li>; z9 O, h8 ^2 B* ^& W
- <li><?php the_category(', '); ?></li>
8 r/ S8 f% x4 @5 b+ \; c - <li>|</li>
# h& d/ E$ j" j" D( Y - <li><?php comments_popup_link('Comments', '1 Comment', '% Comments'); ?></li> q/ Z4 \4 ]1 q- j1 W+ J. P; ?5 d
- </ul>
2 y* Y# T& U2 D! M - </div>+ v: a' b& a% ~. Q
- <?php } ?>2 j% j( _% K- E- S
- <div class="postleft">- j$ L0 X' b1 `8 L
- <a href="<?php the_permalink(); ?>"><img src="<?php echo $image[0]; ?>" width="150" height="150" border="0" title="<?php the_title(); ?>" alt="<?php the_title(); ?>" /></a>1 z4 U4 n8 V$ `& t
- </div>
& L' d) s S8 n7 }( V -
; ~8 ?3 j; j! u5 c1 B& u- q9 a, P - <div class="postright">7 j7 e+ z, r7 j M) I
- <p><?php excerpt('200'); ?> <a href="<?php the_permalink(); ?>">Read More »</a></p>
/ ?( I0 E) U0 E0 h, _' }" O: J - </div>, U& V8 U' ^$ T# }1 ]' Q& z- L: L
- * u6 ]) H( ~# h2 K! C" H8 w
- <div class="clear"></div>1 [2 H# P* G+ T7 i4 w7 T7 F) a
- # b }5 ^3 [" N5 `
- <?php } else { ?>
|& c, O9 V, R: A9 [: R - 4 v" `4 f: ^8 I G
- <h2<?php if(!of_get_option('showmeta')){ ?> class="postmargin"<?php } ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
h3 k9 E- N, ]4 |3 x4 q- t; L - <?php if ( of_get_option('showmeta')) { ?>1 `5 N9 {5 F1 ? \% ?+ S
- <div class="post_meta">( ?6 ^: z" T, \% O2 p) i3 A) v) e$ {
- <ul>
) p& f9 K! V0 [6 R' M# _ - <li><?php the_time('M d, Y'); ?></li>
( a! W/ t* {1 O6 o1 k. x - <li>|</li>
- o8 a7 @: x1 q- M - <li><?php the_category(', '); ?></li>2 B6 x5 s( N [& r6 S
- <li>|</li>
+ Y- ~: _' y7 k - <li><?php comments_popup_link('Comments', '1 Comment', '% Comments'); ?></li>( ]3 }$ D* ~! c3 O' s
- </ul># m" h- I1 O% ^
- </div>
4 ~, {1 q1 E; q* n8 y! q - <?php } ?>; c# F& K3 z' P3 G3 n# V
-
* a% t1 Z' A4 [, G - <p><a href="<?php the_permalink(); ?>"><img src="<?php echo $image[0]; ?>" width="150" height="150" border="0" title="<?php the_title(); ?>" alt="<?php the_title(); ?>" align="left" class="fullconentimg" /></a><?php the_content(); ?></p>
{$ ], P5 ]. `# J/ O4 e0 _; T: _ -
3 |, J' H$ U* @* { - <div class="clear"></div>
, @7 X @; z6 N, e6 P' S' ` -
4 f( h+ {1 l3 _( }$ S" f - <?php } ?>
2 f5 x* ?4 ^7 w, y0 i - $ Z, s: _; K0 y
- </div>! L* C7 U& j" D
- <!-- end post -->
2 x, E9 w+ a5 u6 K -
( Q" o# [, c7 J7 y) g* h5 ]1 ~ - <?php else: ?>9 p7 N5 h# }/ j: s o/ C
-
/ L7 O5 h4 ?, J) ^0 m% [& r% Y - <!-- post -->- c9 B2 Q* B2 h- c7 S& g
- <div class="post">2 M3 A! ]+ K* t2 W
- : _; u0 t: [) X6 L
- <h2<?php if(!of_get_option('showmeta')){ ?> class="postmargin"<?php } ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
' m$ I. [0 \+ t - <?php if ( of_get_option('showmeta')) { ?>
2 c% g: p; R$ f) c) p- ~ - <div class="post_meta">
5 L- D) @. G5 ?# F% ]/ \4 L - <ul>* [) N8 |4 y6 Y: D& f& V. w$ Q
- <li><?php the_time('M d, Y'); ?></li>
2 s5 n3 k. v! Y1 e: E$ c4 t% P - <li>|</li>- x4 ] {. x$ q; Z
- <li><?php the_category(', '); ?></li>
* s* F0 i6 I( U* U& x9 i: ^ - <li>|</li>5 }" q! X+ h# A; J" j2 f
- <li><?php comments_popup_link('Comments', '1 Comment', '% Comments'); ?></li>
9 U# n9 S% Z5 j - </ul>
; ?7 I7 \; ~3 B( C2 e3 K7 k - </div>. G* E6 g9 N- J; \0 f" d
- <?php } ?>
) Y3 @& V6 Q) h - <?php if ( of_get_option('home_excerpt')) { ?>
) w4 w( H( i5 b I' q- ~ - <p><?php excerpt('300'); ?> <a href="<?php the_permalink(); ?>">Read More »</a></p>6 P$ ?4 |: M+ I: I3 [3 H
- <?php } else { ?>
9 a1 a7 @- E( S - <p><?php the_content(); ?></p>
" m; O; M: ~8 b$ F3 I3 P6 A: T - <?php } ?>
; ~% R- p, D5 @ t" C - ) {% ~. V2 O9 v4 J" ~, F, t! X' Q
- </div>
3 Q2 @6 l( G; m* w0 L - <!-- end post -->
* q ]* U" O. x- s6 N0 S% C1 } - 3 E% X+ j6 K* X, l0 m: C$ N
- <?php endif; ?>
" d" ]5 s( ^( X7 K/ d - : N) L8 i0 o/ N2 W& P
- <?php endwhile; endif; ?>8 _' n8 C# s' s
- 3 O- Y. O3 q! j) q% a( l
- <?php } ?>
; r5 x7 k: F4 p+ Q! V2 j - 0 v# t0 {, k. H* M, s+ L
- <?php if ( !function_exists('dynamic_sidebar')
2 }; o, N& l: k. U- A" J. p - || !dynamic_sidebar('Ad Position 8') ) : ?>9 @! [: C! g; B0 L
- <?php endif; ?>
6 _6 T7 E: d o$ ? - 1 m2 \% ?4 {! ~0 y
- </div>0 _0 i! a# a& K3 A/ _: S: O+ z6 `
- <!-- end leftcontent -->
1 H& C; s& X1 a0 j9 a - 6 _6 Y, o) c. @3 H
- <?php if(of_get_option('site_layout') == '3c-l' || of_get_option('site_layout') == '3c-r'){ ?>& C \4 O2 U- i% u9 t8 l. M) l
- <div class="midcontent">+ r# O6 ]! B/ V+ w3 V
- <?php if ( !function_exists('dynamic_sidebar')' S. ?+ ]5 ?" u2 K: x
- || !dynamic_sidebar('Middle Column') ) : ?>& L8 k7 T) [7 w0 }1 I$ _
- <?php endif; ?>: e% ? x/ J' s# W
- </div>
- J" ^$ }1 f. [ - <?php } ?>
! c, }& }& v& }5 x) M) Q - 2 a2 \# \) |" v4 Z
- <?php get_footer(); ?>
複製代碼 這個代碼是不是有什麼問題?應該怎麼修改的呢?( H1 V/ o: v( C# \7 w) S2 o
|