Support » Fixing WordPress » Absolute WP Newbie- JavaScript help

  • As the resident web person, I’ve been handed a website running on WP and asked to add a scrolling feature to the front page. “No problem!,” I thought and quickly wrote out the snippet in JS. Well, now I’m ready to update the page, but find that it’s a little more involved than just uploading a few files and tweaking the front page. Now after reading the Using Javascript and other WP Support pages and a few blogs that show how “simple” this is, I’m banging my head against the wall. Can anyone help?

    So here’s what I’ve got:

    a CSS file (which I copied to the end of the style.css in WP)

    an Image file (added to media and attached to the page)

    A JS file (What to do? I tried copying the contents into script tags and making it inline on the page, but that didn’t work. I can’t find a place to upload the file except the media section, but that doesn’t seem right?)

    And I edited the page to replace the current object with the div that will contain the scrolling feature.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Unfortunately “copied to the end of the style.css” make it sound like you edited the theme. If there is ever an update to the theme, your added CSS will be lost.

    Adding a script to a page works when I do it (as administrator). Adding CSS to a page should work, too. Doing this only makes sense if you want your new feature on just one page. If you want it throughout the site, then writing a custom plugin or a child theme would be a better way to do it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Absolute WP Newbie- JavaScript help’ is closed to new replies.