我的页面http://www.allyourpods.no/有一些奇怪的“漏洞”,我一辈子都无法弄清楚。
我希望得到一些帮助来弄清楚如何让它以适当的方式自动填充网站。
我的开始屏幕模板文件如下所示:
<?php
/*
Template Name: Home Template
*/
get_header(); ?>
<?php query_posts('cat='.recPodcastCategory.'&showposts=30');?>
<?php $categories = get_categories('child_of='.recPodcastCategory); ?>
<?php if($categories): $count=0;?>
<div class="recommended">
<div class="wrapper">
<div class="main_recommended_main_block">
<?php foreach($categories as $category) { if($count<30) { $count++;
if($count!=30) $class='recommend_block'; else $class='recommend_block_1'; ?>
<?php if (function_exists('get_terms_meta'))
{
$cat_image = get_terms_meta($category->term_id, 'image',true);
$add_play_podcast = get_terms_meta($category->term_id, 'play_download',true);
}?>
<div class="<?php echo $class;?>">
<div class="main">
<?php $play_podcast = get_post_meta($post->ID,'play_podcast',true);?>
<div class="view view-fifth"><?php if($cat_image):?><img src="<?php echo $cat_image;?>" alt="category image" /><?php endif;?>
<?php if($add_play_podcast):?>
<div class="mask"><a href="<?php echo get_category_link($category->term_id);?>" class="info">Play</a></div>
<?php endif; ?>
</div>
</div>
<?php echo substr( category_description( $category->term_id ),0,100 ) . "..."; ?>
</div>
<?php } } ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if(!isset($_GET['pod_category']))$class_all = ' class="active"'; ?>
<div class="clr"></div>
<?php get_footer(); ?>
如果需要更多信息,请告诉我。