收集一波常见的加速NPM包的CDN,发现有些还是挺好用的,基本上可以替代unpkg、jsdelivr,用来做博客或者网站加载NPM使用还是可以的。......
wordpress riprov2自定义分类下文章缩略图宽高设置教程
1、修改:ripro-v2\ripro-v2\inc\options\taxonomy-options.php将注释去掉。如下:
2、后台分类中将自定义栏目缩略图开关打开3、打开/wp-content/themes/ripro-v2/inc/template-tags.php搜索:根据模式输出缩略图img 延迟加载html标签将下边代码:
if (!function_exists('_get_post_media')) { function _get_post_media($post = null, $size = 'thumbnail',$video = true) { if (empty($post)) { global $post; }elseif (is_numeric($post)) { $post = get_post($post); } $_size_px = _get_post_thumbnail_size(); $src = _get_post_thumbnail_url($post, $size);替换成:
if (!function_exists('_get_post_media')) { function _get_post_media($post = null, $size = 'thumbnail',$video = true) { if (empty($post)) { global $post; } $category = get_the_category($post->ID); $catid = $category[0]->term_id; if (get_term_meta($catid, 'is_thumb_px', true)) { $_size_px = get_term_meta($catid, 'thumb_px', true); //缩略图高度 }else{ $_size_px = _get_post_thumbnail_size(); } $src = _get_post_thumbnail_url($post, $size);以上方法由办公区教程网编辑摘抄整理自互联网仅供大家参考!
标签: riproV2文章缩略图自定义分类WORDPRESS知识社区
相关文章
- 详细阅读
-
WordPress网站文章ID不连续如何解决?笔记已测试详细阅读
对于WordPress网站文章ID不连续的问题困扰了我很久,今天将WordPress文章ID不连续的原因和具体解决办法做详细的说明。 WordPress文章ID不连续的原因: 用WordPress做网站的站......
2023-08-17 24
-
wordpress建站教程:文章自动调用特色图片详细阅读
继续分享wordpress建站教程。我们在日常更新wordpress网站文章时基本都需要手动添加文章的缩略图,一般是根据文章内容来添加,虽然麻烦一点,但效果更好,对普通的企业wordpress外......
2023-08-14 66