,我做的一個站,有個模板,為什麼首頁不顯示,是不是出現什麼問題的呢?我網站是:http://www.healthprotections.com0 x- z* O7 F6 P6 N$ t# s2 `% T
, Y' o# x0 S& y0 Y! ]首頁代碼是:- <?php get_header(); ?>) Y7 E, ^6 m5 F# M
- , n( e) T% [7 i8 a8 O
- <!-- content -->
^7 G3 ?$ X2 ?, m - <div class="content">3 v( D- D1 M/ q9 C
-
* {9 }# j0 @# \% v' u% Q f1 Z - <?php if ( !function_exists('dynamic_sidebar')
$ S" ~* ^0 D: B% Z$ j$ Q - || !dynamic_sidebar('Ad Position 2') ) : ?>% z$ ~* X+ q: y, I0 \9 M
- <?php endif; ?>0 [* c3 z8 B8 j' Q8 M
- 5 ^8 k) S$ j) f4 h4 F) h
- <!-- leftcontent -->! K9 A \; r, _9 _: @' @- L! c
- <div class="<?php if ( substr(of_get_option('site_layout'),-1) == 'l' ) { echo 'leftcontent-l'; } else { echo 'leftcontent';}?>"># B/ t1 |, m4 v1 g
-
W3 c- N* `, I: g - <?php if ( !function_exists('dynamic_sidebar')2 v9 \( e0 h- Y) P
- || !dynamic_sidebar('Ad Position 3') ) : ?> {! C6 Y' q# a4 u
- <?php endif; ?>
0 i# X3 j6 n' n2 D: y -
' T( |- s3 p" A0 v3 o0 l - <?php if ( of_get_option('homeheading') <> "" ) { ?>
9 ^ k- i) ?* e0 }! v$ ` - <h1 class="postmargin"><?php echo of_get_option('homeheading'); ?></h1>- k2 p2 G# g5 F; y6 |
- <?php } ?>- v" Z" d# o* {; s% @5 i4 L/ q8 a" f
6 [; a; c8 C! `" h) ~' c1 [6 E- h3 m( m- <?php if ( of_get_option('homeintro') <> "" ) { ?>
7 e1 c7 b% R* W& W% U - <div class="intro">
5 }( P5 f/ f3 s -
0 B# K* E4 \* N - <?php if ( !function_exists('dynamic_sidebar')
9 F* z' `5 G% B( J& v5 P1 a* ~* Z - || !dynamic_sidebar('Ad Position 5') ) : ?>
: d# F4 i. Q' }6 D( D. p- A! R - <?php endif; ?>7 p; O3 P y0 p2 M9 W5 j
- & k% P& T7 Z9 i8 t8 Z
- <?php if ( !function_exists('dynamic_sidebar')
5 M! v7 t+ z2 A& ?: R3 t - || !dynamic_sidebar('Ad Position 6') ) : ?>; V) _4 \! J0 V
- <?php endif; ?>! G& g! t8 }( _. G, l. V, I, n9 w: ^
-
& `7 K9 B1 G1 A2 x6 p( } - <?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 } ?>
$ m% K/ r* ~# \. n5 F3 e - <?php echo stripslashes(of_get_option('homeintro')); ?>* \3 V* L. F) u$ k9 I
- </div>7 ]( R8 {5 x* W+ ^! X
- <?php } ?>
1 C# V1 Y" d0 J. ?% X: h) n -
7 u" j8 D3 G0 f) V- b" b" \9 e - <?php if ( !function_exists('dynamic_sidebar')2 U' C6 _3 C: C: M* u: L
- || !dynamic_sidebar('Ad Position 7') ) : ?>
' C7 v; m' B3 _9 C - <?php endif; ?>5 _" L7 h R" s- U- t4 }0 e
-
- b* t0 |7 U' [7 s - <?php if ( of_get_option('show_home_posts')) { ?>. Z; ?7 D1 b9 T+ p
-
' u% L d% i$ V3 p; w - <?php if ( of_get_option('categories_home') <> "" || of_get_option('home_posts') ) { ?>( c" ]( ?2 n+ A
- <?php $cattoinclude = of_get_option('categories_home'); ?>6 N( S9 t, ?0 l' C/ K( V9 ?0 y/ t
- <?php $homepostnumber = of_get_option('home_posts'); ?>
# B" Z0 V# G" l2 f/ e - <?php query_posts('cat='.$cattoinclude.'&showposts='.$homepostnumber); ?>
7 d* D$ `. s5 h% P4 s- h3 M# J2 v - <?php } ?>' j% e! z6 L5 z4 V# r' }, o
- 9 T, o: [; Y) a( Y# `! s! ]
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>+ ~* {% Z: }3 i% a1 w
- 6 [. g. o$ }. V6 Z L
- <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'med-thumb' ); ?>
4 k o' f6 ~5 S' i# z3 C - <?php if ($image): ?>2 z# Q- ?' d: K; r0 S# U5 y/ I
-
: n2 R8 |- M( z - <!-- post -->* `- |$ [: Y# o I# j: l
- <div class="post">' r5 r6 A* z+ h; x$ k" [( V
-
) t1 t. n1 @ | - <?php if ( of_get_option('home_excerpt')) { ?>& q/ ?- @% B2 @6 ]/ b& x8 d) o9 }
-
5 {' a4 e/ b1 ? - <h2<?php if(!of_get_option('showmeta')){ ?> class="postmargin"<?php } ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>$ v* `/ \/ f! H( f
- <?php if ( of_get_option('showmeta')) { ?>! o* f; R- _( F
- <div class="post_meta">
6 j7 T q! c2 L3 j - <ul>) p, L1 a9 h0 E9 K' H5 r
- <li><?php the_time('M d, Y'); ?></li>. h( ~ G% I; l# I
- <li>|</li>7 c6 p+ x4 \) q% z" M
- <li><?php the_category(', '); ?></li>& c& w- T) \# M! f
- <li>|</li>
" Y6 P/ A% e: d - <li><?php comments_popup_link('Comments', '1 Comment', '% Comments'); ?></li>
# j G5 B2 p( o3 q1 G - </ul>0 c. R0 y0 T) p' D5 O! T* r
- </div>
" l6 u3 K* P4 S$ v4 K4 a' M! G' ^ - <?php } ?>
0 j+ [7 ^" S- `5 R. b; E+ K: A - <div class="postleft">( M0 B4 q/ l$ v6 I# s s
- <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>7 y* [. k Y8 p0 N# M; m5 u
- </div>
t' V8 Z) ~: \ -
7 e0 |0 X6 Z: H9 N* j - <div class="postright">8 u- G. E. {3 F
- <p><?php excerpt('200'); ?> <a href="<?php the_permalink(); ?>">Read More »</a></p>3 \' ?3 l: ?( c6 _
- </div>
" Y' J; s. c; i1 I6 n& d - ) A% D" N; q- _6 L3 T
- <div class="clear"></div>; \: K1 Q( B! G7 I. [2 o, c
- - w+ x2 A" h; y' ~
- <?php } else { ?>3 Z, J5 }' i: ]7 x! t
-
" @# _) l# L1 s. S! N - <h2<?php if(!of_get_option('showmeta')){ ?> class="postmargin"<?php } ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>0 K& @! @2 n. _
- <?php if ( of_get_option('showmeta')) { ?>
% p: w+ H7 G! R8 H0 E( b - <div class="post_meta">
2 ~( V* U7 M7 N2 R+ u; q% | - <ul>
0 w+ Z1 @- Y& x6 L6 a1 ~6 r4 I0 s - <li><?php the_time('M d, Y'); ?></li>
. j' Q$ N+ V/ R0 a - <li>|</li>7 }+ U- u8 o8 u0 S) t( z) l% l8 M
- <li><?php the_category(', '); ?></li>. t# {7 V- _; x7 b$ o5 f
- <li>|</li>% c- \$ n8 m. v8 H8 A
- <li><?php comments_popup_link('Comments', '1 Comment', '% Comments'); ?></li>
; f5 X4 x4 Q. m7 I3 {; F$ d - </ul>+ G0 x5 Y4 R5 v7 K+ y
- </div>
1 p; O( O; W. T9 v - <?php } ?>
" N3 P1 n' B1 _8 d+ m -
: L B8 ?4 b' a" Y0 n8 W: G5 [% p - <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>" N1 T) q. R0 q5 @; g
-
l# B8 w6 C; V& l) T7 K - <div class="clear"></div>
1 l- f, J- j6 k" m -
; B* F, V) E& s3 W- B; H - <?php } ?>
$ @ B: _8 l$ J: {7 H -
. A7 U5 h0 B1 Q4 N - </div>4 a$ R2 |& K+ n
- <!-- end post -->
, f4 ^9 F0 I! K6 x$ ] -
: n- d9 T! E4 S1 [6 H; B0 v - <?php else: ?>
9 o' W* C7 ?$ \6 C: u- a -
3 V. y# u) k5 G0 `- q7 _ - <!-- post -->! P' b5 S% l s: o% C; V% W, T
- <div class="post">
0 t/ K4 k( X/ \" ?: _ - 3 N( Z& p( r1 T* l# ~
- <h2<?php if(!of_get_option('showmeta')){ ?> class="postmargin"<?php } ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>1 f ^% p9 R7 H k5 e& S% N$ V
- <?php if ( of_get_option('showmeta')) { ?>
$ [* S- }) Q8 p7 [) M0 a; ? - <div class="post_meta">' n" v5 X7 d/ K* I$ ^
- <ul>: I( o, x. ]& ?4 L2 g7 y% u
- <li><?php the_time('M d, Y'); ?></li>
) v2 K Y: G( D+ \ - <li>|</li>2 J, k) Q7 [( E& S% D: O# f. D
- <li><?php the_category(', '); ?></li>( a) V! i1 Y) G$ i! H
- <li>|</li>* b: J; Y- C; l8 i0 i, z. L
- <li><?php comments_popup_link('Comments', '1 Comment', '% Comments'); ?></li>
, k8 F: w% Q( F! H( O& F* ? - </ul>7 e! V ?2 w" B5 ]) d$ R t6 [
- </div>, ~3 U# E9 c' C! {! f! H2 S4 w3 N
- <?php } ?>
* a- a; M! S! p - <?php if ( of_get_option('home_excerpt')) { ?>
3 u% u: _% s& I7 B N# O& I - <p><?php excerpt('300'); ?> <a href="<?php the_permalink(); ?>">Read More »</a></p>! S' L' C% T' C% Q. {- ]* T) ~
- <?php } else { ?>9 E& S% @* k+ g7 @0 v/ s
- <p><?php the_content(); ?></p>
8 U6 H! @4 D/ }* s* V, S - <?php } ?>- W. V" o3 t; h* i0 [9 D
- $ X) G/ b2 x3 ~/ F( `
- </div>
# i& l/ T# ?( \, R1 i- ^ - <!-- end post -->
! W! d% l4 Q; i -
) @! t. B7 |0 D3 k$ S. d - <?php endif; ?>! ^" u* U' q. v- A5 F; z
-
- w) X% E5 Q0 J+ Y# I1 U - <?php endwhile; endif; ?>
9 _* N( {5 g$ B* P% L6 ?# a - 8 L4 Y6 K- T& S! f/ p/ M
- <?php } ?>! y+ Z/ F) E% Y4 m9 ]( m
-
0 }$ \) _4 |# q) B( Y# ] - <?php if ( !function_exists('dynamic_sidebar')
! }: f6 R; ]3 t& P1 o0 ? - || !dynamic_sidebar('Ad Position 8') ) : ?>2 B) d7 ]) Y; l
- <?php endif; ?>
2 l0 Y) o$ i3 k0 c - 0 b: n6 U. J$ R5 `$ d: S
- </div>* D& f# Y/ x& @# p. M
- <!-- end leftcontent -->4 x5 R0 D/ _; p0 d1 J: \/ z' A
- 0 c2 H3 h- s ]4 s
- <?php if(of_get_option('site_layout') == '3c-l' || of_get_option('site_layout') == '3c-r'){ ?>
! y' U; l) ^& |3 [$ t3 k3 I - <div class="midcontent">+ c/ h# M Y9 H+ f
- <?php if ( !function_exists('dynamic_sidebar')5 o% @2 d7 U1 v2 \7 ^' M& `
- || !dynamic_sidebar('Middle Column') ) : ?>
7 @% [; ]9 U7 T9 S - <?php endif; ?>
( N n' Z7 `. Z% K" W - </div>
8 L& e) c$ ?' H( Y% A8 M3 r* _ - <?php } ?>( F1 \+ `$ y3 P. l- g" c9 [4 @
-
- p" R. e( u' x w! R4 @ - <?php get_footer(); ?>
複製代碼 這個代碼是不是有什麼問題?應該怎麼修改的呢?& o9 n! N/ t# H2 v b! ~. I
|