高级自定义字段:Image Crop Add-on插件在Wordpress中对我无效?
问题描述:
I am using Wordpress 4.6.1 version. first time, I install the plugin and activate it. second time, I copied plugin folder into my theme and paste this code into functions.php
add_action('acf/register_fields', 'my_register_fields');
function my_register_fields()
{
include_once('acf-image-crop/acf-image-crop.php');
}
But both time i don't see any options like this enter link description here
I also R&D on this but get nothing. please someone guide. Thanks in advance.
我使用的是Wordpress 4.6.1版本。 第一次,我安装插件并激活它。 第二次,我将插件文件夹复制到我的主题并将此代码粘贴到functions.php p>
add_action('acf / register_fields','my_register_fields');
function my_register_fields()
{
include_once('acf-image-crop / acf-image-crop.php');
}
code> pre>
但是这两次我都没有看到像这样的选项
在此处输入链接描述 p>
我也对此进行研发,但什么都没有。
请指导某人。 提前致谢。 p>
div>
答
Firstly, make sure you've tried the following steps:
- Downloaded ACF plugin and add it to your site, activated it.
- Downloaded the ACF Image crop plugin and moved it into your theme folder
- Added the specified code to your functions to register the acf image crop
If you've tried all of the above, try adjusting the acf-image-crop code to the following:
add_action('acf/register_fields', 'my_register_fields');
function my_register_fields()
{
include_once(get_template_directory_uri() . 'acf-image-crop/acf-image-crop.php');
}