Archived topic
echo do_shortcode before anything else
5 replies · Started by Eber on March 22, 2023
Hello,
I am trying to echo do_shortcode echo do_shortcode('[HDquiz quiz = "97873"]'); before everything that appears after the content, on single pages, by inserting the code on the content-single.php file, but it shows always after the output from Rate My Post and YARPP plugins.
Can you help me solve this?
Thanks!
Hi Eber,
Can you try adding that snippet through a Hook Element?
Hook it to generate_before_main_content.
Reference: https://docs.generatepress.com/article/hooks-element-overview/
Hello Fernando,
Thank you for your help, but using generate_before_main_content, it loads before the post title, on the top.
And if using generate_after_main_content, it loads in the bottom, even after the comments.
Where do you want it exactly?
For reference, here's a visual guide for hooks you may use: https://docs.generatepress.com/article/hooks-visual-guide/
Thanks, Fernando!
You're welcome, Eber!