WordPress.org

Ready to get started?Download WordPress

Forums

How to Make Javascript work in a new Page (2 posts)

  1. agentsully
    Member
    Posted 7 years ago #

    I am trying to set up a new page and I want to insert the following code:

    <script type="text/javascript">
    var indeed_publisher_id = 'xxx';
    </script>
    <script type="text/javascript" src="http://www.indeed.com/p/jobsite.js"></script>
    <noscript>Visit my Job Site</noscript>

    I have the WYSIWYG editor off.
    I have read the Using Javacript support page, but I don't know if I am supposed to put something into Header.php or not.

    If so, what, specifically, do I put in there.

    I have very little understanding of javascript.
    Thank you in advance for the help!

  2. doc_holiday
    Member
    Posted 7 years ago #

    I have asked a very similar question on these forums and didn't receive a response. In my case, it was how to create a Google Reader Blog Roll on a page using the code generated from this page:

    http://googlesystem.blogspot.com/2007/08/blogroll-powered-by-google-reader.html

    The difficulty is that it appears that the content in a wordpress page doesn't get executed. It just gets called upon from the database and printed.

    So, using the information on this: http://codex.wordpress.org/Pages I created a custom page template with the code on it that I wanted to execute. Then I just created a page as normal, but selected my new template before publishing it.

    Hope that helps you. In my case, this worked because all I needed was to run the Google blog script which was in affect the whole page except for some introductory text at the top. I don't know how you would do this if your page was more complex.

Topic Closed

This topic has been closed to new replies.

About this Topic