,我做的一个站,有个模板,为什么首页不显示,是不是出现什么问题的呢?我网站是:http://www.healthprotections.com
首页代码是:- <?php get_header(); ?>
- <!-- content -->
- <div class="content">
-
- <?php if ( !function_exists('dynamic_sidebar')
- || !dynamic_sidebar('Ad Position 2') ) : ?>
- <?php endif; ?>
-
- <!-- leftcontent -->
- <div class="<?php if ( substr(of_get_option('site_layout'),-1) == 'l' ) { echo 'leftcontent-l'; } else { echo 'leftcontent';}?>">
-
- <?php if ( !function_exists('dynamic_sidebar')
- || !dynamic_sidebar('Ad Position 3') ) : ?>
- <?php endif; ?>
-
- <?php if ( of_get_option('homeheading') <> "" ) { ?>
- <h1 class="postmargin"><?php echo of_get_option('homeheading'); ?></h1>
- <?php } ?>
- <?php if ( of_get_option('homeintro') <> "" ) { ?>
- <div class="intro">
-
- <?php if ( !function_exists('dynamic_sidebar')
- || !dynamic_sidebar('Ad Position 5') ) : ?>
- <?php endif; ?>
-
- <?php if ( !function_exists('dynamic_sidebar')
- || !dynamic_sidebar('Ad Position 6') ) : ?>
- <?php endif; ?>
-
- <?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 } ?>
- <?php echo stripslashes(of_get_option('homeintro')); ?>
- </div>
- <?php } ?>
-
- <?php if ( !function_exists('dynamic_sidebar')
- || !dynamic_sidebar('Ad Position 7') ) : ?>
- <?php endif; ?>
-
- <?php if ( of_get_option('show_home_posts')) { ?>
-
- <?php if ( of_get_option('categories_home') <> "" || of_get_option('home_posts') ) { ?>
- <?php $cattoinclude = of_get_option('categories_home'); ?>
- <?php $homepostnumber = of_get_option('home_posts'); ?>
- <?php query_posts('cat='.$cattoinclude.'&showposts='.$homepostnumber); ?>
- <?php } ?>
-
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
-
- <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'med-thumb' ); ?>
- <?php if ($image): ?>
-
- <!-- post -->
- <div class="post">
-
- <?php if ( of_get_option('home_excerpt')) { ?>
-
- <h2<?php if(!of_get_option('showmeta')){ ?> class="postmargin"<?php } ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
- <?php if ( of_get_option('showmeta')) { ?>
- <div class="post_meta">
- <ul>
- <li><?php the_time('M d, Y'); ?></li>
- <li>|</li>
- <li><?php the_category(', '); ?></li>
- <li>|</li>
- <li><?php comments_popup_link('Comments', '1 Comment', '% Comments'); ?></li>
- </ul>
- </div>
- <?php } ?>
- <div class="postleft">
- <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>
- </div>
-
- <div class="postright">
- <p><?php excerpt('200'); ?> <a href="<?php the_permalink(); ?>">Read More »</a></p>
- </div>
-
- <div class="clear"></div>
-
- <?php } else { ?>
-
- <h2<?php if(!of_get_option('showmeta')){ ?> class="postmargin"<?php } ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
- <?php if ( of_get_option('showmeta')) { ?>
- <div class="post_meta">
- <ul>
- <li><?php the_time('M d, Y'); ?></li>
- <li>|</li>
- <li><?php the_category(', '); ?></li>
- <li>|</li>
- <li><?php comments_popup_link('Comments', '1 Comment', '% Comments'); ?></li>
- </ul>
- </div>
- <?php } ?>
-
- <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>
-
- <div class="clear"></div>
-
- <?php } ?>
-
- </div>
- <!-- end post -->
-
- <?php else: ?>
-
- <!-- post -->
- <div class="post">
-
- <h2<?php if(!of_get_option('showmeta')){ ?> class="postmargin"<?php } ?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
- <?php if ( of_get_option('showmeta')) { ?>
- <div class="post_meta">
- <ul>
- <li><?php the_time('M d, Y'); ?></li>
- <li>|</li>
- <li><?php the_category(', '); ?></li>
- <li>|</li>
- <li><?php comments_popup_link('Comments', '1 Comment', '% Comments'); ?></li>
- </ul>
- </div>
- <?php } ?>
- <?php if ( of_get_option('home_excerpt')) { ?>
- <p><?php excerpt('300'); ?> <a href="<?php the_permalink(); ?>">Read More »</a></p>
- <?php } else { ?>
- <p><?php the_content(); ?></p>
- <?php } ?>
-
- </div>
- <!-- end post -->
-
- <?php endif; ?>
-
- <?php endwhile; endif; ?>
-
- <?php } ?>
-
- <?php if ( !function_exists('dynamic_sidebar')
- || !dynamic_sidebar('Ad Position 8') ) : ?>
- <?php endif; ?>
-
- </div>
- <!-- end leftcontent -->
-
- <?php if(of_get_option('site_layout') == '3c-l' || of_get_option('site_layout') == '3c-r'){ ?>
- <div class="midcontent">
- <?php if ( !function_exists('dynamic_sidebar')
- || !dynamic_sidebar('Middle Column') ) : ?>
- <?php endif; ?>
- </div>
- <?php } ?>
-
- <?php get_footer(); ?>
复制代码 这个代码是不是有什么问题?应该怎么修改的呢?
|