Hi,
I used the instructions on this thread https://kriesi.at/support/topic/table-of-contents-widget-how-to-show-it-on-top-of-the-content-of-a-post-or-page/ and I can add the shortcode to the page, And the TOC is appearing.
But it’s always placed as the first thing on the page instead where the shortcode is (more below into the content).
Can you help figure out a way to fix it?
Thanks
Hey TheBiZWeavers,
Thank you for the inquiry.
Look for this line in the custom shortcode..
$toc = new avia_auto_toc;
return $toc->widget($args, $instance);
.. and replace it with.
ob_start();
$toc = new avia_auto_toc;
$toc->widget($args, $instance);
$output = ob_get_clean();
return $output;
Let us know if that helps.
Best regards,
Ismael
hi Ismael,
Sorry for the response delay and tyvm, because your answer worked like a charm.
Thank you again
til next time
Cheers