WordPress.org

Ready to get started?Download WordPress

Forums

Any way to put things in the HEAD section of a page? (5 posts)

  1. mwrmwr
    Member
    Posted 5 years ago #

    I'd like to put some JavaScript code in the HEAD section of a page so I can use it in the main body of the page. Is there a way to do that?

  2. ClaytonJames
    Member
    Posted 5 years ago #

    Take a peek in header.php of your current theme. I think that might be the right spot in most themes.

  3. SimonJ
    Member
    Posted 5 years ago #

    Well... Call your script in the <head> section of header.php then use it wherever you need in your template files... (category, single, index, page, etc.)

    S.

  4. mwrmwr
    Member
    Posted 5 years ago #

    I only need this javascript on one page, but I guess there's no significant downside to calling it in the HEAD of every page. Correct?

    Also, I intend to use those java functions in the html view of the normal page edit window. Will that work?

  5. mwrmwr
    Member
    Posted 5 years ago #

    One second thought, there's way too much stuff I need to put into the HEAD section of this one page to have it there for all pages. If I can't have a HEAD section for one page different than for other pages, I'll probably make that page a separate, non-WP, page and pop it up from a link.

    Any other suggestions welcomed...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.