[Resolved] Add snippet just before closing body tag

Home Forums Support [Resolved] Add snippet just before closing body tag

Home Forums Support Add snippet just before closing body tag

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1882065
    mkjj

    This has been asked many times before, but the standard solutions did not do the trick. I need to include some CSS at the very bottom of the page. I have to override the CSS for the WP audioplayer. The stylesheets are included after the footer content. So, the usual wp_footer hook does not work. It puts the CSS before the included WP styleeteets. I would have to use !important, which I try to avoid.

    Is there a solution in Generatepress out-of-the-box to include some stuff just before the closing body tag without modifying a template file?

    Thank you!

    #1882374
    David
    Staff
    Customer Support

    Hi there,

    use a Hook Element select the wp_footer hook and set the priority to a real high value, eg. 500.
    The higher the priority value the further down the code it will be output.

    #1882403
    mkjj

    Geez! I tried 100, but that was not enough. Haven’t even thought about a higher value. Lessons learned. :-))

    Thank you very much!

    #1882441
    David
    Staff
    Customer Support

    Glad to be of help 🙂

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