I want to show a acf text field as shortcode in a view.
I added [acf] to the Third-party shortcode arguments.
But the shortcode [acf field='lid_info_plaats' post_id='[wpv-post-id]'] does not show content.
Yes, I checked that the field exists and has a value.
Hello. Thank you for contacting the Toolset support.
Can you please tell me what ACF custom field you want to display and exactly where.
Please share admin access details and problem URL and whthin what view you want to display ACF field.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
This is in local development environment so no login possible.
what: acf text field as shortcode: [acf field='lid_info_plaats' post_id='[wpv-post-id]']
where: in a Toolset view (content template, loop item)
how: I added [acf] to the Toolset Third-party shortcode arguments.
UPDATED INFO
I switched on extended debug from toolset and tried acf code with a fixed id instead of [wpv-post-id]' -> but this also does not work
Looks like the acf shortcode is filtered out.
UPDATE putting the shortcode in a regular page gives me an error:
The requested ACF field is not allowed to be output in bindings or the ACF Shortcode.
So I will contact acf support about this first. After that I will let you know if this is resolved.
1. acf field needs t be set to allowed in public UI in field settings! So it will show on front end.
2. activate shortcodes with
add_action( 'acf/init', 'set_acf_settings' );
function set_acf_settings() {
acf_update_setting( 'enable_shortcode', true );
}
That is all and it works now.