WordPress.org

Ready to get started?Download WordPress

Forums

Javascript in pages (7 posts)

  1. livewire
    Member
    Posted 9 years ago #

    Hi, I'm interested in being able to use a custom javascript function in pages of my blog. The javascript simply pops up a custom sized window and such. But I can't seem to be able to get to work after having inserted the function definition into the theme. I tried putting it in the header and the page template.

    Any thoughts would be very helpful-

  2. Lorelle
    Member
    Posted 9 years ago #

  3. livewire
    Member
    Posted 9 years ago #

    Thank you =D

  4. ongakukaku
    Member
    Posted 8 years ago #

    that link to codex only talks about linking to JS via the header, it doesn't cover anythign about JS in pages

  5. Lorelle
    Member
    Posted 8 years ago #

  6. ongakukaku
    Member
    Posted 8 years ago #

    yea your right, only thats for posts not pages, some of the examples given just do not work on pages unfortunately, kind of make sense seeing the page is only content spit out from the database therefore it's not a real page that's why the javascripts don't work

    even tried the example given for the posts that didn't work

  7. coolmomo123
    Member
    Posted 8 years ago #

    Hi, I'm trying to insert the javascript code for technorati onto my sidebar. I saw the codex info. and I tried following the example that it gives, but it's still not working out for me.

    Here is what I put on bottom of the header template:
    <script type="text/javascript" src="http://embed.technorati.com/embed/6yaey5x3h.js"></script>

    Here is what I put on the bottom of my sidebar template:
    <div class="6yaey5x3h">
    <script type="text/javascript">
    <!--
    6yaey5x3h();
    //--></script>
    </div>

    Can anyone point out my mistake to me? Thanks...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags