WordPress.org

Ready to get started?Download WordPress

Forums

Running a java-script/HTML code that runs sitewide? (7 posts)

  1. RyKo
    Member
    Posted 3 years ago #

    I hope I am in the right section...

    So, I wish to implement a pop-up java-script that runs on my entire website (not just pages, posts or the homepage; everywhere!). I already have the java-script code (duh), but I don't know how and where to implement it, so that it runs without causing any problems.

    I once accomplished this (but, I forgot exactly how), by placing the java-script code in a separate "script.php" file that I created and then pasted a code a file of my theme that would then point to the "script.php" file and make it run. It was most likely in the theme's "functions.php" or "header.php"

    I would appreciate any help, thank you!

  2. keesiemeijer
    moderator
    Posted 3 years ago #

  3. RyKo
    Member
    Posted 3 years ago #

    I've tried this & receive a parse error.

  4. keesiemeijer
    moderator
    Posted 3 years ago #

    Can you show us the code involved?
    How to post code in WordPress forum topics: http://codex.wordpress.org/Forum_Welcome#Posting_Code

  5. RyKo
    Member
    Posted 3 years ago #

    Sure...

    [Code moderated as per the Forum Rules. Please use the pastebin]

  6. RyKo
    Member
    Posted 3 years ago #

    Here's the pastebin version...

    http://pastebin.com/7huM4AB6

  7. RyKo
    Member
    Posted 3 years ago #

    Anybody able to help?

Topic Closed

This topic has been closed to new replies.

About this Topic