Issue with ACF Shortcode Not Working
-
Hi there,
I’m experiencing an issue with the ACF shortcode no longer working for the fields in a specific custom post type on my WordPress site. Up until a few months ago, the following shortcode worked fine, but now it doesn’t display anything:
[acf field=”menu_della_settimana_lunedi_pranzo” post_id=”3804″]
Here are some additional details about my setup:
- I have created a custom post type called “menu” using the CPT UI plugin.
- The field group “menu_della_settimana” is assigned only to this custom post type.
- The specific field I want to display is a WYSIWYG editor with the field name “lunedi_pranzo”, and it’s part of the group “menu_della_settimana” but I noticed that even other types of fields won’t display
- I’m trying to display this field for a post with ID 3804
- I’m using ACF version 6.3.6
I’ve already tried the following steps:
- Verified that the post ID is correct.
- Checked that the WYSIWYG field contains content.
- Disabled other plugins to rule out conflicts.
- Tried modifying the shortcode syntax and even called the field directly using PHP
<?php echo get_field('lunedi_pranzo', 3804); ?>
, but that also didn’t work. - Activated the shortcodes using the following code in the file functions.php of my website:
add_action( 'acf/init', 'set_acf_settings' );
function set_acf_settings() {
acf_update_setting( 'enable_shortcode', true );
}
Can you please help me troubleshoot this issue? Any insights would be greatly appreciated!
- You must be logged in to reply to this topic.