承接 starise/post-thumbnails 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

starise/post-thumbnails

最新稳定版本:3.0.0

Composer 安装命令:

composer require starise/post-thumbnails

包简介

PostThumbnails Class for Wordpress. Enables multiple post thumbnails for post type.

关键字:

README 文档

README

PostThumbnails Class for Wordpress. Enables multiple post thumbnails for post type.

Requirements

  • PHP >= 5.4
  • WordPress >= 3.5

Quick Start

First, in your theme's functions.php (or you can create a shim plugin that does this on the wp_loaded action) register a thumbnail. To do this, create a new PostThumbnails instance and pass in an array of arguments:

use starise\PostThumbnails as PostThumbnails;

new PostThumbnails(
    [
        'label' => 'Secondary Image',
        'id' => 'secondary-image',
        'post_type' => ['post']
    ]
);

The template tag PostThumbnails::the_post_thumbnail is similar to WordPress' the_post_thumbnail but it displays your custom thumbnail in a post loop:

<?= PostThumbnails::the_post_thumbnail('secondary-image'); ?>

For more details please check out the wiki

统计信息

  • 总下载量: 121
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2015-01-31