标签归档:Catch box

Snip20220328 35

catch box主题搜索结果显示特色图像 featured images now showing in search results

参考官方论坛答疑

catch box 主题搜索结果是摘要,不显示特色图片,去了论坛,有答案。如下:

/wp-content/themes/catch-box/content.php 第38行 左右

`if ( is_search() ) : // Only display Excerpts for Search ?>
<div class=”entry-summary”>
<?php the_excerpt(); ?>
</div><!– .entry-summary –>`

换成即可:

if ( is_search() ) : // Only display Excerpts for Search ?>
            <div class="entry-summary">
             <?php if ( has_post_thumbnail() ):?>
               		<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'catch-box' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
						<?php the_post_thumbnail('featured-slider'); ?>
                   	</a>
                <?php endif; ?>
                <?php the_excerpt(); ?>
            </div><!-- .entry-summary -->

Catch box 主题修改css如下

/* 阅读更多另起一行 */ 
.more-link {
display: block;
margin-top:10px;
}
/*小工具文字大小、行高 */ 
.widget a
{
font-size: 15px;
line-height: 1.6em;
}
.widget{
padding:15px;
}
/*文章内表格 */ 
.wp-block-table td {
padding: 4px;
}
/* 小工具标题底部的点*/ 
.widget-title {
border-bottom: 1px dotted #ccc;
}
/* 所有框取消 */ 
.hentry,
.widget,
.post-navigation,
.no-results,
.page-header, 
.breadcrumbs,
.error404 {
border:none;
}
/* 图片边框取消 */ 
img[class*="wp-image-"],
.textwidget img,
img.wp-post-image,
img.attachment-thumbnail{
border:none;
}

#site-generator {border:none;}


/* 面包屑取消首页 */ 
.home .breadcrumbs.breadcrumbnavxt {
display: none;
}

wordpress Catch Box主题更改页面宽度、字体粗细

这款主题在我建立独立博客时,就一直在使用,简洁的风格,什么都不缺,可以满足日常写文章。最大的特点是主题配色很有冷淡风,并且扁平化,响应布局,在移动手机表现良好。轻代码,seo友好,很轻巧,一眼看上去就赏心悦目。

缺点:没有汉化,没有人翻译啊,翻译成繁体中文也行啊,毕竟在wordpress有排名的啊。(2022年已经在litepress.cn 社区翻译,需要安装wp-china-yes插件转到社区选项才能收到翻译推送,我也将翻译包传给主题原作者,将来会直接在wordpress官方下载就是中文的。)

另一个缺点是在mac电脑字体对中文优化不好,字体很细,好像只有300,改成500就正常了。如果你找不到好用耐看的主题,这款特别适合,不管是写文章也好,写日记,哪怕是写游记,图片风格都能应付自如。

很多喜欢折腾wordpress博客的最终都回归了原始,特别是wordpress官方制作的主题,很多人在使用,在这个互联网时代,Google搜索注重的是内容,只有内容充足、丰富,写的文章才能被被人读到。

简洁的主题最大的优点是不用折腾,耐看,不会审美疲劳,经典的东西始终都有人爱,Catch Box则是基于wordpress官方主题 twenty eleven 开发,适合个人博客记录。

在这里感谢同样使用Catch Box主题的网友,提供了更改主体布局的大小的代码:https://www.neohope.org

2022年3月更新

之后照葫芦画瓢更改了CSS样式,将框框的黑线去掉,去掉了照片的边框,添加了面包屑,增加了宽度,修改了阅读更多。如下:Catch box 主题修改css