Site logo

[Resolved] echo do_shortcode before anything else

Home Forums Support [Resolved] echo do_shortcode before anything else

Home Forums Support echo do_shortcode before anything else

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2577928
    Eber

    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!

    #2577933
    Fernando
    Customer Support

    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/

    #2577946
    Eber

    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.

    #2577983
    Fernando
    Customer Support

    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/

    #2578041
    Eber

    Thanks, Fernando!

    #2578124
    Fernando
    Customer Support

    You’re welcome, Eber!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.