Accordions in template files?
-
I’m trying to add accordions to a single.php template for a custom post.
I’ve tried
<?php echo do_shortcode('[accordion]'); ?>
etc.But didn’t work. The opening ‘accordion’ and ‘accordion-item’ got translated to div’s but the closing shortcodes appeared as the shortcode itself. And the accordion did not work.
I also tried hardcoding the div’s and classes into the template (no shortcodes) and that also did not work.
I made sure the JS was in the footer by default… and also tried putting it in the head.
Any ideas?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Accordions in template files?’ is closed to new replies.