[wordpress插件] Category Thumbnail Excerpt类别缩略图摘录

wordpress 插件 文章 2020-03-18 21:30 520 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

These must be in function.php in the theme for the plugin to work for thumbnail and excerpt:

这些必须在主题的function.php中,插件才能使用缩略图和摘录:

add_theme_support( ‘post-thumbnails’ );

add_theme_support(‘缩略图’’);

set_post_thumbnail_size( form_option(‘thumbnail_size_w&&echo=false’), form_option(‘thumbnail_size_h&&echo=false’), true );

set_post_thumbnail_size(form_option('thumbnail_size_w && echo = false'),form_option('thumbnail_size_h && echo = false',true);

function custom_excerpt_length( $length ) {
    

function custom_excerpt_length($ length){
    

return 20;

返回20;

}

}

add_filter( ‘excerpt_length’, ‘custom_excerpt_length’, 999 );

add_filter('excerpt_length','custom_excerpt_length',999);

function custom_excerpt_more( $more ) {
    

函数custom_excerpt_more($ more){
    

return ”;

返回”;

}

}

add_filter( ‘excerpt_more’, ‘custom_excerpt_more’ );

add_filter('excerpt_more','custom_excerpt_more');

You’ll also need to add thumbnails to the posts you want visible in the list.

您还需要向要在列表中显示的帖子添加缩略图。

After that, all you need to do is to add the hook [getcatlist 1] (where 1 is a categoy id) to your post.

在那之后,您要做的就是将钩子[getcatlist 1](其中1是类别ID)添加到帖子中。

安装步骤

This section describes how to install the plugin and get it working.

本节介绍如何安装插件并使其正常工作。

    1. Upload “categoy-thumbnail-list” to the “/wp-content/plugins/” directory
    2. 将“ categoy-thumbnail-list”上传到“ / wp-content / plugins /”目录

    3. Add the following rows to your themes functions.php

    4. 在主题函数中添加以下行。php

      add_theme_support( ‘post-thumbnails’ );

      add_theme_support(‘缩略图’);

      set_post_thumbnail_size( form_option(‘thumbnail_size_w&&echo=false’), form_option(‘thumbnail_size_h&&echo=false’), true );

    5. set_post_thumbnail_size(form_option('thumbnail_size_w && echo = false'),form_option('thumbnail_size_h && echo = false'),true);

    6. Activate the plugin through the “Plugins” menu in WordPress
    7. 通过WordPress中的“插件”菜单激活插件

    8. Add the hook in a post.

    9. 将钩子添加到帖子中。

      Example: [getcatlist 3]

    10. 示例:[getcatlist 3]

下载地址
https://downloads.wordpress.org/plugin/categoy-thumbnail-excerpt.1.0.zip
-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] Custom Product Stickers for WoocommerceWoocommerce的自定义产品贴纸
[wordpress插件] Board Document Manager from CHUHPLCHUHPL董事会文件经理
[wordpress插件] Avoid Google's Cache避免使用Google的缓存
[wordpress插件] Appointment Schedule karenapp预约时间表karenapp
[wordpress插件] Date Permalink Base日期永久链接库
随便看看
企业微信通讯录账号被管理员误/恶意删除,怎么办? 8012
问题? 7247
如何快速搭建抽奖助手小程序(无需代码知识) 5033
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 5985
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5505
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5201
如何解决渲染层网络错误Failed to load media? 16556
小程序找号找回 释放昵称? 2421
我的小程序广告主收入5301,实际进账4406,是怎么回事呀? 2503
删除部分微信用户个人数据的通知,怎么删除? 5542