【发布时间】:2014-03-14 22:16:36
【问题描述】:
晚上好,我已经设法将 redux 框架嵌入到 WP 主题中并且一切正常,但我更像是一名设计师而不是程序员,我想使用选项类型“sorter”(https://github.com/ReduxFramework/redux-framework/wiki/Fields#sorter)来主页中的“get_template_part”基于启用的列和保存的顺序。
我的输出是 print_r($redux_options['home_blocks']['enabled']):
Array
(
[placebo] => placebo
[slider] => Slider
[highlights] => Highlights
[services] => Services
[staticpage] => Static Page
)
我想要这样的东西:
slider = get_template_part('templates/content','slider');
highlights = get_template_part('templates/content','highlights');
services = get_template_part('templates/content','services');
staticpage = get_template_part('templates/content','staticpage');
当然与数组具有相同的顺序,并且如果存在于启用的列中。
我查看了 shoestrap3 以了解他们如何设法使分拣机看起来,但最新版本 (3.1.0.2) 中未使用此选项
【问题讨论】:
标签: php wordpress themes wordpress-theming redux-framework