Hi Sharon,
If you enable the FAQ Category Toggle option, it should display the categories as a list on page load, with the ability to expand each category individually. This would, by far, be the easiest way to achieve what you’re looking to do.
If, instead, you wanted to display a list of categories at the top of your page, independent of the shortcode, you’d have to include multiple instances of the shortcode – one for each category – and then write your own HTML code.
One way to do this would be:
Add your table of contents at the top
Add UFAQ shortcodes with the ‘include_category’ attribute. This attribute targets specific categories so only the faqs of certain categories will display.
To find what value you need to enter in for ‘include_category’, navigate to the “Categories” tab in the plugin settings and look under the Slug column in the table on the right.
Add your anchor link just above the ‘include_category’ shortcode (in the example below, we wrapped them in <h5> headers so they’ll stand out a bit better on the page)
Example:
<p>TABLE OF CONTENTS</p>
<a href="#cats">Cats</a>
<a href="#dogs">Dogs</a>
<h5><a id="cats"></a>Cats</h5>
[ultimate-faqs include_category='cats']
<h5><a id="cats"></a>Dogs</h5>
[ultimate-faqs include_category='dogs']