<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                [TOC] # 渲染參考 | 方式 | 角度 | 功能 | | --- | --- | --- | | 內置函數 | the\_title、the\_content、the\_excerpt | 快速渲染基本字段 | | 對象屬性 | $page->post\_title | 直接訪問對象屬性 | | WP查詢 | WP\_Query + the\_title | 使用查詢遍歷結果集渲染 | | 過濾器 | the\_contentfilter | 在已有函數基礎上改變渲染結果 | | 自定義函數 | my\_render\_phone() | 自定義函數渲染特殊字段 | | 第三方插件 | ACF the\_field() | 定義自定義字段后統一渲染 | ## 1. 過濾器 使用如 the_content 等已有函數,然后在模板中添加過濾器改變渲染結果。 ## 2. 對象屬性 對于頁面對象等,可以直接訪問對象的屬性渲染,例如 $page->post_title 。 ## 3. 內置函數 * the_title - 顯示文章/頁面標題。 * the_content - 顯示文章內容。 * the_excerpt - 顯示文章摘要。 * get_the_title - 獲取文章/頁面標題字符串。 * get_the_content - 獲取文章內容字符串。 * get_the_excerpt - 獲取文章摘要字符串。 ## 4. WP查詢 WP_Query - 使用 WP_Query 查詢文章,然后循環結果集,在循環中使用 the_title 等函數渲染字段。 ## 5. 第三方插件 ACF - 使用 Advanced Custom Fields 插件定義自定義字段,然后在模板中使用 the_field() 渲染。 CMB2 - 使用 CMB2 插件定義自定義字段,然后在模板中使用 get_post_meta() 渲染。 ## 6. 自定義函數 自定義函數 - 定義自定義函數渲染字段,例如 my_render_phone(),然后在模板中調用。 ## 7. post_meta post_meta - 顯示自定義字段,使用 get_post_meta() 獲取。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看