douwei7203 2015-08-10 03:54
浏览 6

标记页面页脚缩略图

So here's the thing.

By default on my wordpress theme the Numbered navigation on Tag pages won't work. Only on Tag pages. So a friend solved it for me. He did it by putting this code in my functions.php:

    add_filter('pre_get_posts', 'Pricerr_g_query_post_type');
function Pricerr_g_query_post_type($query) {
  if(is_tag()) {
    $post_type = get_query_var('post_type');
 if($post_type)
     $post_type = $post_type;
 else
     $post_type = array('post','job');
    $query->set('post_type',$post_type);
 return $query;
    }
}

Now, when that solution is implemented the Thumbnails for my posts and widgets on the Tag pages breaks. So my friend fixed it by adding this code in functions.php:

<? $image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'thumbnail' ); ?>
                <a href="<?php the_permalink(); ?>"><img width="102" height="72" class="<?php echo $img_class; ?>" 
                src="<?php echo $image[0]; ?>" /></a>

So that fixes the Post thumbnails on the Tag pages, but the Widgets thumbnails (latest posts, featured posts) still won't show.

You can see what I'm talking about on this page. Scroll down and see the footer widgets: http://bit.ly/1PfmNjM

Hope someone can help. Thank you.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 ETLCloud 处理json多层级问题
    • ¥15 matlab中使用gurobi时报错
    • ¥15 这个主板怎么能扩出一两个sata口
    • ¥15 不是,这到底错哪儿了😭
    • ¥15 2020长安杯与连接网探
    • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
    • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
    • ¥16 mybatis的代理对象无法通过@Autowired装填
    • ¥15 可见光定位matlab仿真
    • ¥15 arduino 四自由度机械臂