Navigation

    Digital Liberation Forums

    • Register
    • Login
    • Search

    Singe Page insert just before </body> (Header & Footer Scripts)

    Header and Footer Scripts
    2
    2
    314
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      KerryG last edited by

      Hi,
      Thanks for this handy plugin!
      I see how to add code just before </body> in ALL pages, but I need to add it to a SINGLE PAGE just before </body>.
      How can I do that?
      Out of interest, why is that not standard - is there a specific reason?
      Many thanks
      Kerry

      anand 1 Reply Last reply Reply Quote
      • anand
        anand @KerryG last edited by

        Hello @KerryG

        This feature is not built in because in most case <head> is sufficient. If you want to add some script to a limited number of page/posts then use standard wp_footer along with is_single or is_singular.

        I could help better if you share the code you want to add.

        Or read the following to figure out yourself:
        https://developer.wordpress.org/reference/functions/is_single/
        https://codex.wordpress.org/Plugin_API/Action_Reference/wp_footer

        1 Reply Last reply Reply Quote
        • First post
          Last post