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.
“代码区域”字段允许您将自定义CSS,Javascript,HTML和PHP添加到高级自定义字段中,并且可以在您的wordpress模板文件中的任何位置使用。 p>
The code area uses Code Mirror and has various themes to suit.
代码区域使用代码镜像,并具有各种适合的主题。 p>
CSS
CSS strong>
Type your css, no tags needed
输入您的CSS,不需要标签 p>
Javascript
JavaScript strong>
Type your Javascript, no tags needed
输入您的Javascript,不需要标签 p>
PHP
PHP strong>
Type your PHP, no tags needed (Note, you can not open and close php tags anywhere in your code)
键入您的PHP,不需要标签(请注意,您无法在代码中的任何位置打开和关闭php标签) p>
Output all types of code in the usual fashion the_field(‘code_area_field’);
以通常的方式输出所有类型的代码the_field(‘code_area_field’); p>
Compatible with both ACF V3 & V4
与ACF V3和V4兼容 strong> p>