[wordpress插件] Custom Post Type Images自定义帖子类型图片

wordpress 插件 文章 2020-04-09 09:40 482 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Custom Post Type Images makes it easy to attach an image to any custom post type, which you can then call as necessary in the archive page for that post type OR in the single itself, depending on how you use the plugin.

自定义帖子类型图像使您可以轻松地将图像附加到任何自定义帖子类型,然后您可以根据需要在插件页面中针对该帖子类型调用该图像,也可以单独使用一个,具体取决于您使用插件的方式。

Think of it as a featured image for your post types, which you can use on overview or other pages.

可以将其视为您的帖子类型的特色图片,您可以在概述或其他页面上使用它。

安装步骤

    1. Upload cptImages directory to your /wp-content/plugins/ directory
    2. cptImages 目录上传到您的 / wp-content / plugins / 目录

    3. Activate the Custom Post Type Images plugin through the ‘Plugins’ page in WordPress
    4. 通过WordPress中的“插件”页面激活“自定义帖子类型图像”插件

    5. Go to Tools > Manage Custom Post Type Images.
    6. 转到工具>管理自定义帖子类型的图像。

    7. To use, select an image for the custom post type and attach.

    8. 要使用,请为自定义帖子类型选择一个图像并附加。

      You can then use the image in various ways:

    9. 然后,您可以通过多种方式使用图片:

    As a shortcode.

    作为简码。

    Put [cptImage] wherever you want the image to appear.

    将[cptImage]放置在要显示图像的任何位置。

    Not that in this usage (without a parameter) it will only appear when you are on a single item of that custom post type OR in the archive page itself.

    并不是这种用法(不带参数)仅在您位于存档页面本身中的该自定义帖子类型OR的单个项目上时才会显示。

    To call any attached image, use [cptImage cpt=”Custom Post Type Name”].

    要调用任何附加的图像,请使用[cptImage cpt =“自定义帖子类型名称”]。

    In PHP in your template.

    在PHP中使用模板。

    To retrieve the image url to a variable, use get_cptimage_image($optionalname, $echo) (you can use get_cptimage_image(“Custom Post Type Name”) to retrieve a specific post type image, or get_cptimage_image(“Custom Post Type Name”, true

    要获取图像URL的变量,请使用get_cptimage_image($ optionalname,$ echo)(您可以使用get_cptimage_image(“自定义帖子类型名称”)来检索特定的帖子类型图像,或使用get_cptimage_image(“自定义帖子类型名称”,true

    ) to echo the url rather than retrieving it. To merely display the image, call cptimage_image(“Custom Post type Name”) or simply cptimage_image(). Not that if you do not pass a post type name it will only appear when you are

    )以回显网址而不是检索网址。仅显示图片,请调用cptimage_image(“自定义帖子类型名称”)或简单地cptimage_image()。并不是说,如果您不传递帖子类型名称,则仅当您

    on a single item of that custom post type OR in the archive page itself.

    在该自定义帖子中的单个项目上,或者在存档页面本身中输入。

    Please note, as with every plugin or theme modification, you should do a backup of your files beforehand.

    请注意,与每个插件或主题修改一样,您应该事先备份文件。

    Although we’ve tested this across many installs, we are not responsible for anything it does to your system and do not guarantee support.

    尽管我们已经在许多安装中对此进行了测试,但是我们对您的系统所做的任何事情概不负责,也不保证会提供支持。

下载地址
https://downloads.wordpress.org/plugin/custom-post-types-image.0.6.zip
-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] Comapi Webchat PluginComapi Webchat插件
[wordpress插件] CleanCodeNZ Exclude Pages PluginCleanCodeNZ排除页面插件
[wordpress插件] Canvasflow for WordPressWordPress的Canvasflow
[wordpress插件] amCharts EmbedamCharts嵌入
[wordpress插件] Speed Kit速度套件
随便看看
企业微信通讯录账号被管理员误/恶意删除,怎么办? 9568
问题? 9048
如何快速搭建抽奖助手小程序(无需代码知识) 6177
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 7472
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 6793
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 6128
如何解决渲染层网络错误Failed to load media? 17394
小程序找号找回 释放昵称? 3253
我的小程序广告主收入5301,实际进账4406,是怎么回事呀? 3108
删除部分微信用户个人数据的通知,怎么删除? 6381