Raw HTML Accordion Widget
With the Accordion Category Widget installed you can easily generate a link tree of posts listed by blog categories or from custom taxonomies.
The widget comes as is, but you can recreate custom accordions with raw HTML using the following options on this page.
The first option is raw HTML which you can simply paste into any template or area in WordPress that accepts HTML to render a pre-styled accordion widget. You can use the raw HTML to build a thorough accordion widget this way.
The second option is the dynamic approach which you can simply fill-in an array that will dynamically build your widget based on the array structure.
Insert Accordion Script
Both approaches require you to add a small JavaScript call to the bottom of the page(s) you want to show the widget on (see JS tab at top of page).
To insert the accordion script you can paste it into the footer of the MD scripts manager either from the global settings panel or from any individual page.
From a functions filed you can insert the accordion script like so:
<?php wp_add_inline_script( 'marketers-delight', "MD.accordion( 'accordion_unique_name' );" ); ?>
Make sure the accordion_unique_name
ID is set to match the HTML ID you set per accordion, and that this inline call loads after the Marketers Delight scripts.js
file has loaded on the page.