Hello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
Please try to use the following custom CSS on your website and see if that helps you to achieve the listing style:
.wp-block-rank-math-toc-block ol{
counter-reset: item;
}
.wp-block-rank-math-toc-block li{
display: block;
}
.wp-block-rank-math-toc-block li:before{
content: counters(item, ".") " ";
counter-increment: item;
}
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/
Let us know how it goes. Looking forward to helping you.
Thank you.
THe issue got solved.
1. Is there any way to make ass show/hide option in this TOC?
2. Is there any way to make this TOC sticky?
Hello,
1. By default, there’s no way available to make TOC by Rank Math collapsible, but if you want you can use the following customize CSS on your site to make Rank Math TOC block 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 a filter/hook to your WordPress site:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
2. Unfortunately, we currently don’t have this option, and adding further customization is no out of the scope of our support. I would suggest hiring a developer to make the TOC sticky on your website.
Hope that helps and please do not hesitate to let us know if you need my assistance with anything else.
which method is better and secure for adding a filter/hook in wordpress site – plugin method or manual method?
Hello,
We provided three (3) options to add filter/hooks in the guide: https://rankmath.com/kb/wordpress-hooks-actions-filters/
I personally prefer the first method using a plugin but it is still up to you to decide what’s suitable to your needs.
If you still have any questions, just reply and we will be more than happy to clarify any doubts you might have.
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.