【问题标题】:Redux Framework does not work on some filesRedux Framework 不适用于某些文件
【发布时间】:2017-04-27 17:39:39
【问题描述】:

此代码在 single.php 中有效,但在 template-parts 文件夹中的 content.php 中无效。

<?php if( $opt_name['content-meta-hide'] == '1' ){ ?>
    <div class="entry-meta">
    ...
    </div>
    <?php }; ?>

【问题讨论】:

    标签: wordpress templates frameworks redux-framework


    【解决方案1】:

    我在模板的 index.php 中使用 get_template_part( 'template-parts/content', get_post_format() ); 我只在模板部分的 content.php 文件中使用了一个函数。

    <?php if( $opt_name['content-meta-hide'] == '1' ){ ?>
    <div class="entry-meta">
    ...
    </div>
    <?php }; ?>
    

    当我在 redux 中做某事时它不起作用。

    【讨论】:

      猜你喜欢
      • 2017-09-19
      • 1970-01-01
      • 2017-07-20
      • 2014-03-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-21
      相关资源
      最近更新 更多