晚上好,我已经设法在 WP 主题中嵌入了 redux 框架,一切都很好,但我更像是一个设计师而不是程序员,我想使用选项类型“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)中没有使用