,我做的一個站,有個模板,為什麼首頁不顯示,是不是出現什麼問題的呢?我網站是:http://www.healthprotections.com- X$ |9 ^. A; Q( W
! a' [7 U( |1 @0 L0 h
首頁代碼是:- <?php get_header(); ?># c- X3 P5 Y7 V* k: C% h" H
- 8 x" G" [; h7 u, Z
- <!-- content -->' \! x* p. ?5 w ~
- <div class="content">
0 R: G" b* @$ J b# @7 M3 ?; r6 f -
2 w- c) V9 v* e - <?php if ( !function_exists('dynamic_sidebar')4 C9 ~$ z: L9 J0 P
- || !dynamic_sidebar('Ad Position 2') ) : ?>6 l2 b% c( q) ?
- <?php endif; ?>
0 ~3 y) }; ^) p/ f( D6 ^ -
* w0 E3 q) ?! C8 a& B0 z: a) ?' S - <!-- leftcontent -->
5 J- r ?; _: W6 H* D2 h* y - <div class="<?php if ( substr(of_get_option('site_layout'),-1) == 'l' ) { echo 'leftcontent-l'; } else { echo 'leftcontent';}?>">
) \! F& m: {- B2 Q( Z. ^+ z - : X; ^* Z6 m, _) |0 m$ u) G
- <?php if ( !function_exists('dynamic_sidebar')! o, o) E0 V/ _8 U% |
- || !dynamic_sidebar('Ad Position 3') ) : ?>
; N. p& `% v) O - <?php endif; ?>
/ Q5 g8 W7 i. [5 ` -
5 f1 l7 O2 Y g0 o3 | - <?php if ( of_get_option('homeheading') <> "" ) { ?>
* g n: ~+ o( z* L$ B - <h1 class="postmargin"><?php echo of_get_option('homeheading'); ?></h1>, k; p8 r5 v1 i. i' \4 M2 ~0 t
- <?php } ?>
1 B$ K! I% p h/ T( U% Z' } - ! w% S0 X- I$ r
- <?php if ( of_get_option('homeintro') <> "" ) { ?>
) P' h/ A% \) T K8 |/ ? - <div class="intro">2 f2 {8 b+ l- E* D+ R/ D: X6 f/ O
- 6 g& P1 h6 r3 M+ u1 U; G
- <?php if ( !function_exists('dynamic_sidebar')
* S6 M9 i, @2 {' r! w2 K0 m. p - || !dynamic_sidebar('Ad Position 5') ) : ?>, Q: \3 E5 O5 o- ~7 r
- <?php endif; ?>
% D- X( R$ b2 U9 h4 l" ? -
1 {# u3 S% S" F% R- `. h: N - <?php if ( !function_exists('dynamic_sidebar')
. o9 u' z, }. S( | - || !dynamic_sidebar('Ad Position 6') ) : ?>
3 a; B4 f; T- L$ A$ w7 d - <?php endif; ?>
" ^% [/ Q" R6 s: F1 y" a8 B -
$ D S0 H5 G' |1 b( L3 B# 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 } ?>+ ^- N8 m' U; a5 N4 b
- <?php echo stripslashes(of_get_option('homeintro')); ?>6 i' V0 Q3 A( h
- </div>+ B& K: l- b$ G& \
- <?php } ?>
- `2 }4 ?5 d A - ' P( g& w, \% q) \/ o* Z
- <?php if ( !function_exists('dynamic_sidebar')
7 I* ^ |9 R( G6 ] - || !dynamic_sidebar('Ad Position 7') ) : ?>
0 c5 s' N6 W; F3 w( j# x' Q - <?php endif; ?>* U) l. n" ^; N5 `$ C+ I" f8 @
-
+ H7 S1 U( }9 B! n9 \ R - <?php if ( of_get_option('show_home_posts')) { ?>
# {/ N5 H' U9 _, ~. a - . p( \8 r5 Z0 G
- <?php if ( of_get_option('categories_home') <> "" || of_get_option('home_posts') ) { ?>$ r6 n" b0 ?8 |" O3 V
- <?php $cattoinclude = of_get_option('categories_home'); ?>6 O# i$ w2 N, O3 g5 t( D, ^. x9 n9 s
- <?php $homepostnumber = of_get_option('home_posts'); ?>5 y d: j5 V! @$ n. c" k
- <?php query_posts('cat='.$cattoinclude.'&showposts='.$homepostnumber); ?>
" F4 J* J+ I) W. _! `' ^! v; O - <?php } ?>
! {, W" H. j* u) y) l4 r7 `9 E - & D) G N1 ^1 R% ]6 L( d: m
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
* l' t6 D3 P% P0 d - * I6 E" R: q! N0 a& M( t3 f( [4 L
- <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'med-thumb' ); ?>
; c$ X% _ s4 x- Q7 B; w/ Y. O - <?php if ($image): ?>
/ q- V# [: t8 n6 E8 K -
3 _# c4 d# o' @4 G) F - <!-- post -->) N; U. D( L# E/ w* S3 j! A+ W4 p# w
- <div class="post">
$ u3 d/ P d3 O8 X! b- g - ! i) ^* p# W# n- x z" U
- <?php if ( of_get_option('home_excerpt')) { ?>! {+ D5 G" z/ p" a( D
-
0 d9 ]- U( k% s. c - <h2<?php if(!of_get_option('showmeta')){ ?> class="postmargin"<?php } ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>+ ]& M$ v# v9 x W" X8 G4 c
- <?php if ( of_get_option('showmeta')) { ?>0 g* A& a2 k& U+ q7 x# M
- <div class="post_meta">
; y3 r; t# Y. R - <ul>
% N- B# U# z( O% s1 \+ T. H - <li><?php the_time('M d, Y'); ?></li>
5 l' W3 X/ [' ^5 d - <li>|</li>% g+ x- N0 _7 W- ?% w, U
- <li><?php the_category(', '); ?></li>
) G- W$ P. u6 I3 E, D6 P# f ?- ^, Z - <li>|</li>
6 ?/ `: m' _ b5 h' u - <li><?php comments_popup_link('Comments', '1 Comment', '% Comments'); ?></li>* l# T: p9 D5 x
- </ul>0 V% D' w ^5 Z% Q1 R$ U. H9 L
- </div>
% o0 ?' {( }5 o5 ] - <?php } ?>* B. `- }1 l8 o0 C
- <div class="postleft">! {; x4 L- h3 a) f7 q
- <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>; ]* g4 _% d# N' q! ~
- </div>8 \; v3 L6 k! R8 o+ V& H. |4 C+ C) V
-
" c8 k, ^6 x+ i* ^: g1 a) K, K% l - <div class="postright">
7 {2 j/ |+ h+ ^" }* M - <p><?php excerpt('200'); ?> <a href="<?php the_permalink(); ?>">Read More »</a></p>0 S1 D4 m; j; ~: x9 n
- </div>
" E2 S* \8 U8 W. f* `! w' ] - r0 g% N; ~. i6 C1 g
- <div class="clear"></div>+ T3 c7 b% a) i- x6 u
- 6 ?0 M, f1 P' @
- <?php } else { ?>7 t7 k1 [& f# g/ v1 N8 x) U _
-
5 E' X i2 g; D$ L8 X$ r - <h2<?php if(!of_get_option('showmeta')){ ?> class="postmargin"<?php } ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>% V8 Q4 i" K0 X0 n1 P, I
- <?php if ( of_get_option('showmeta')) { ?>9 |6 d3 W. ?) L: O9 h* ?4 a* \1 o+ c
- <div class="post_meta">
- X( e& j/ Q1 H# Z - <ul>$ c, C& X7 d2 c% Y3 e9 S# |( C* ^
- <li><?php the_time('M d, Y'); ?></li>/ a3 S$ p9 a, {: P- d6 |
- <li>|</li>
2 J2 C9 x& M# s6 D$ [ - <li><?php the_category(', '); ?></li>. ^' ] m6 }9 h0 t2 A. a! \+ V
- <li>|</li># N1 N" W6 d/ v. l' V
- <li><?php comments_popup_link('Comments', '1 Comment', '% Comments'); ?></li>
+ K( }6 _4 Y( }6 P+ B& E- @" [& a - </ul>/ Q$ t( I6 d& a, ?5 u
- </div>- {( h1 V. }# t3 e) K/ S6 D' C
- <?php } ?>
1 y& [' ^/ A+ c. n$ |- s -
$ i6 Z; l" T7 Q' e% f - <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>7 Y) H) L: a# U9 }5 d- O
-
~: G+ V/ N, }7 k& h- E4 r - <div class="clear"></div>
5 _! \$ ^( K& Y - 4 o' x7 k0 q" H$ i+ A! q
- <?php } ?>
7 N6 M$ B4 a; b1 G H* m" ~, z4 x -
4 |+ M: G( q8 F+ o1 B; q" l - </div>
5 K3 K+ n" L* [; l: V8 O - <!-- end post -->, v6 h5 \; C/ m7 f/ k6 G% e& `
-
6 T! N! o+ K1 x0 ~$ ?% W - <?php else: ?> H- T$ X. r1 G U+ `8 L6 h3 t. v5 z
- + q6 ^0 L1 R2 d# X3 t7 n
- <!-- post -->
L; E- h3 E- Y* h - <div class="post">
$ t2 c. Z7 d( |/ n7 D* s' A - 5 r9 `- W( W0 z, M& a5 z" p" b
- <h2<?php if(!of_get_option('showmeta')){ ?> class="postmargin"<?php } ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>& D i. s' {: O0 a1 i
- <?php if ( of_get_option('showmeta')) { ?>
' w% }9 X4 ~5 p. d - <div class="post_meta">
1 H* z0 H" W0 |6 w. [- n - <ul>- Q3 l- S a5 a. {8 u" e! F. Z
- <li><?php the_time('M d, Y'); ?></li>/ s) p) x8 H U4 a
- <li>|</li>
3 ~# ~6 A* a, L8 _ - <li><?php the_category(', '); ?></li>- F6 ]) F: t3 o, B$ I
- <li>|</li>6 x0 K- \) T# I6 [1 d
- <li><?php comments_popup_link('Comments', '1 Comment', '% Comments'); ?></li>2 b8 c" b) Y+ h
- </ul>3 s2 k4 Z6 _" Y/ X* D, O$ ?# k7 w6 P
- </div>
]% D' v) h- c. ]" y - <?php } ?>2 [5 L" K z$ M* x6 l
- <?php if ( of_get_option('home_excerpt')) { ?>
+ ]7 B/ h+ v* ] - <p><?php excerpt('300'); ?> <a href="<?php the_permalink(); ?>">Read More »</a></p>
! P$ d( A9 {( ~. N0 v0 {% X2 J - <?php } else { ?>
1 g( G, z; n- I3 K V8 ^ - <p><?php the_content(); ?></p># z0 j1 N5 ?) \/ m }
- <?php } ?>2 N S) r% A* P/ b" c
-
% E; B1 J/ O- b6 u0 f - </div>
! J T7 f" F0 c - <!-- end post -->9 L* Y; `2 k: t4 s' \2 C/ v f9 F) X9 l
- % }5 L0 V# J; r, u1 @8 @' M. ?
- <?php endif; ?>" }$ I& w4 D w0 N
-
2 C2 b B4 Q) {+ F3 G - <?php endwhile; endif; ?>
, U% j) s3 ^* t5 ]! ? K) }4 d -
% k% |- H/ i- L - <?php } ?>7 K4 k4 o( ?) _
-
1 U6 y, [" K% P3 T, p. e - <?php if ( !function_exists('dynamic_sidebar')
; r" ]& P2 i! q! N1 d - || !dynamic_sidebar('Ad Position 8') ) : ?>0 m/ Y2 r, P ~; k
- <?php endif; ?>
7 R1 y; z4 x) i+ `7 \; A& m - - W( f) }# b# [: `! w: C' \+ Y
- </div>
9 }# h8 J% T1 ~- k+ R r; A$ G - <!-- end leftcontent -->
8 ]8 W% C$ C8 Y! a -
: ?9 h! @4 E0 f& z - <?php if(of_get_option('site_layout') == '3c-l' || of_get_option('site_layout') == '3c-r'){ ?>
, Q5 g, b6 F+ i - <div class="midcontent">
& g. l n, n2 P/ j7 e - <?php if ( !function_exists('dynamic_sidebar')
8 I6 H2 ~1 ]; W t- H7 k- s! G - || !dynamic_sidebar('Middle Column') ) : ?>
, n/ g+ g' D' s2 g8 J4 y! i! ` - <?php endif; ?>4 a9 ~4 n6 z! n* j) a3 R5 z* u9 d
- </div>/ M2 `) h3 A, l: B' d* X
- <?php } ?>
, w, [( X7 i( ~/ y -
* _9 z0 S! r3 g - <?php get_footer(); ?>
複製代碼 這個代碼是不是有什麼問題?應該怎麼修改的呢?. I5 Z2 N3 I) A
|