Integrating jQuery accordion
In this section, we are going to look at the integration of another popular UI component called Accordion. The accordion is a component that allows you to display a large amount of content within a limited space using collapsible sections. We have chosen the accordion component of the jQuery UI library (https://jqueryui.com/accordion/) as a basic solution. You can find many advanced accordion component libraries.
In the image sliders section, we used a menu page to capture data, and limited it to a single fixed-image slider. However, it’s also important to have the ability to use same component with different content in various places on the site. So, we are going to build accordions with the ability to create unlimited components with dynamic content. We can either use custom post types and store the data in a wp_posts
table, or we can use a custom table. Since we are developing a UI element, we are going to use custom post types to simplify the process. Let...