Hello,
Thank you for contacting us and bringing your concern to our attention.
I’m sorry to inform you that, by default, there is no option available for that but if you want you can use the following customize CSS on your site to make your ToC collapsable:
.wp-block-rank-math-toc-block {
position:relative;
}
.wp-block-rank-math-toc-block h2 {
background: #f1f2f6;
padding: 10px 12px 10px 18px;
cursor: pointer;
font-size: 18px !important;
font-weight: normal !important;
position:relative;
margin-bottom: 0;
}
.wp-block-rank-math-toc-block h2:before {
display:inline-block;
content: "";
width: 0;
height: 0;
border-style: solid;
border-width: 6px 0 6px 12px;
border-color: transparent transparent transparent #000000;
margin-right: 8px;
}
.wp-block-rank-math-toc-block nav{
padding: 10px 10px 0px 10px;
max-height: 0;
overflow:hidden;
}
.wp-block-rank-math-toc-block input:checked+h2~nav {
max-height: 100vh;
overflow:visible;
}
Here’s a guide you can follow to add this custom CSS on your site:
https://www.wpbeginner.com/plugins/how-to-easily-add-custom-css-to-your-wordpress-site/
Once done, please add this filter to your site: https://pastebin.com/i82VnJ3Z
Here’s how you can add filter/hook to your WordPress site:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Let us know how it goes. Looking forward to helping you.
Thank you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.