
內容簡介
The 'Code Area'欄位允許您向進階自訂欄位添加自訂 CSS、Javascript、HTML 和 PHP,並可在 WordPress 模板檔案中的任何位置使用。
代碼區使用Code Mirror,並具有各種主題以適應不同環境。
CSS
輸入您的 CSS,不需要 <style> 標籤
Javascript
輸入您的 Javascript,不需要 <script> 標籤
PHP
輸入您的 PHP,不需要 <?php ?> 標籤(請注意,您不能在代碼中的任何位置打開和關閉 php 標籤)
像往常一樣輸出所有類型的代碼 the_field('code_area_field');
與 ACF V3 和 V4 皆相容
外掛標籤
開發者團隊
② 後台搜尋「Advanced Custom Fields – Code Area Field」→ 直接安裝(推薦)
原文外掛簡介
The ‘Code Area’ field allows you to add custom CSS, Javascript, HTML and PHP to an advanced custom field, whcih can be use anywhere in your wordpress template files.
The code area uses Code Mirror and has various themes to suit.
CSS
Type your css, no tags needed
Javascript
Type your Javascript, no tags needed
PHP
Type your PHP, no tags needed (Note, you can not open and close php tags anywhere in your code)
Output all types of code in the usual fashion the_field(‘code_area_field’);
Compatible with both ACF V3 & V4
