pkj/pkj-page-source
Composer 安装命令:
composer require pkj/pkj-page-source
包简介
Wordpress plugin that lets you show custom post-types as rows or blocks in the content, to avoid manual duplication of content.
README 文档
README
Wordpress plugin that lets you add a source to page, to list custom post-types (forexample a list of the "service" content type below the main content on your /services "page").
Installation
Install with composer. Add this to your composer file:
"require": { "pkj/pkj-page-source": "dev-master" }
Hooks
Changing the generated grid class definitions.
By default this plugin uses boostrap 3 column classes, (col-sm-X, col-md-X, col-lg-X), you can change this by adding this code in your functions.php file:
add_filter('pkj-page-source_blocksizemap', 'my_theme_blocksizemap_hook'); // Customize this function for your needs: public function my_theme_blocksizemap_hook ($blocksizemap) { $class = ''; foreach($blocksizemap as $context => $perRow) { $bit = ''; switch($context) { case 'l': $bit = 'lg'; break; case 'm': $bit = 'md'; break; case 's': $bit = 'sm'; break; } $gridSize = 12 / $perRow; $class .= "col-$bit-$gridSize "; } return $class; }
Changing the "row" class to theme specific.
add_filter('pkj-page-source_rowclass', function () { return 'row'; // Change to your class. });
统计信息
- 总下载量: 31
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPLv2
- 更新时间: 2014-08-02