mmirus/acf-flexible-content-title
最新稳定版本:1.0.0
Composer 安装命令:
composer require mmirus/acf-flexible-content-title
包简介
Display the content of a field in the title bar of your Advanced Custom Fields flexible content sections.
README 文档
README
Display the content of a text sub field in the title bar of your Advanced Custom Fields flexible content sections to make editing your page sections easier to navigate.
I recommend pairing this with a plugin that will help you collapse all of your flexible content sections, such as ACF Repeater & Flexible Content Collapser.
Usage
This plugin looks for a sub field named section_title in the flexible content field. Add a field with that name to your layouts, or use the filter to change which sub field is used.
Changing the Field Used
You can filter that as follows if you wish to use a different sub field:
// change the sub field used in flexible content field title add_filter('acf_flexible_content_title_field', function($title_field, $flexible_field, $layout) { return 'my_text_sub_field'; }, 10, 3);
Arguments
$title_field(string) the name of the title field to be displayed$flexible_field(array) the flexible content field settings$layout(array) the layout settings
Because the flexible content field and layout settings arrays are passed, if desired you could add conditional logic and specify different title fields for different flexible content fields or layouts.
Installation
There are three options for installing this plugin:
- With composer from Packagist:
composer require mmirus/acf-flexible-content-title - With GitHub Updater
- By downloading the latest release ZIP from this repository and installing it like any normal WordPress plugin
Screenshots
Expanded flexible content layout
Overview of flexible content layouts
统计信息
- 总下载量: 2.76k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 35
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-11-10


