I’m trying to have a toggle on a custom post type’s description, as the custom fields that I’ll be showing are more important for the users to browse. I’ve put the following in my template file, but it’s not working. Do I need the [raw] shortcode in the template file? It doesn’t work with or without the [raw] shortcode.
<?php echo do_shortcode('[raw][toggle title="Description"]'.the_content().'[/toggle][/raw]'); ?>
<?php echo do_shortcode('[toggle title="Description"]'.the_content().'[/toggle]'); ?>
Though the toggle appears on the template, it’s empty and the content shows above it.
- You must be logged in to reply to this topic.