WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Adding Java Script. (11 posts)

  1. Inv_Trdr
    Member
    Posted 4 years ago #

    Is it possible to add java script widgets to a page or on the left in the Menu? Also can you add a date and time stamp in Java Script to a page also?
    Thank you.

  2. ptvguy
    Member
    Posted 4 years ago #

    You need to explain a little more about what you're trying to do. A standard Text Widget can be used to place a JavaScript element in the sidebar, but it sounds like you're talking about playing with the header.

  3. esmi
    Forum Moderator
    Posted 4 years ago #

    Is it possible to add java script widgets to a page or on the left in the Menu?

    Only if the page or menu template is widget-capable.

    Also can you add a date and time stamp in Java Script to a page also?

    Should be possible using a custom page template.

    http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

  4. Inv_Trdr
    Member
    Posted 4 years ago #

    I have a Time and date stamp in Javascript I want to add to each page at the beginning. Also, how do you add a widget like and ad in javascript to the menu items on the left or right of a page?
    Thank you.

  5. esmi
    Forum Moderator
    Posted 4 years ago #

    1. Edit page.php and either include a call to your external javascript or include the script itself.

    2. Use a Text widget as ptvguy suggested.

  6. Inv_Trdr
    Member
    Posted 4 years ago #

    Where do I find the Text Widget to add Javascript in a page, post or Menu Item?
    Thank you.

  7. esmi
    Forum Moderator
    Posted 4 years ago #

    Admin/Appearance/Wdigets

  8. Inv_Trdr
    Member
    Posted 4 years ago #

    I have a javascript for an ezine articles author. I am trying to put that in a page so that it displays the widget properly. How do I do that?
    Thanks.

  9. Inv_Trdr
    Member
    Posted 4 years ago #

    The Admin/Appearance/Widgets is for the sidebar. How do I use it to add javascript to a page or post? How does it work in a Menu item if I want to add a new Menu Box with the javascript in it?
    Thanks.

  10. ptvguy
    Member
    Posted 4 years ago #

    Depending on your theme and the specific placement you want, you're probably going to have to go into the PHP files themselves for this. (single.php, page.php, header.php, etc.) The Snippets plugin might help you a little.

  11. Inv_Trdr
    Member
    Posted 4 years ago #

    The ezine articles widget in javascript is pretty wide for me to be able to put in on the menu. That is why I wanted to place it on a page or post. In Joomla you turn off WYSIWYG to insert javascript on a page. Wish WP would have something similar too.
    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.