- This topic is empty.
-
AuthorPosts
-
June 20, 2012 at 3:56 pm #38587kloyMember
OK, I was having this issues in another thread, but I didn’t really know how to ask the right question. I figured out my beef with scripts and plug-ins that are not specially made for WP. Many times it requires a block of js code in the HTML file…right? And for some reason, for me, that seems to screw things up. The answer I guess would be to put it in the functions.php file, but I can never seem to touch that file without screwing it up.
June 20, 2012 at 4:05 pm #104681TheDocMemberI’m wondering how your theme is set up? Only in very rare circumstances should you be inserting JS through a Post or Page. You should be editing your theme (most likely the header.php) to include JS files.
June 20, 2012 at 4:17 pm #104683kloyMembernot in a post/page…Sometimes you need to enter script tags in the header.php file and then add a block of code (even though it’s already linking to an external js file) in the head tag or right after the footer tage. Does that make sense?
I was doing that a lot when I was building site with Dreamweaver.June 20, 2012 at 5:12 pm #104690TheDocMemberTotally makes sense.
Can you give an example of what you’ve tried that has screwed something up?
June 20, 2012 at 6:11 pm #104694kloyMemberI was trying to use this plug-in for a Dynamic Grid Layout.
http://www.wookmark.com/jquery-plugin
https://github.com/GBKS/Wookmark-jQueryJune 20, 2012 at 6:17 pm #104695TheDocMemberIt looks pretty simple, how are you including it in your theme files?
June 20, 2012 at 7:11 pm #104698kloyMemberI entered the external js in a script tag in the head, and then that block of code at the bottom, right before the closing body tag….that’s the way they have it in their example. It didn’t work. Could it have been conflicting with something in the functions.php file? I’m not touching that. When it comes to js I only copy and paste.
I have since found a WP plugin for this behavior, but would still like to know how to deal with these non-WP plug-ins.
June 20, 2012 at 8:18 pm #104700TheDocMemberThis line:
Needs to go after you include jQuery – sounds like you might have accidentally been putting it before.June 24, 2012 at 4:24 pm #104823kloyMemberI made sure the script tags were in order and still couldn’t get it to work.
One script I am trying to use requires a block of js in the head tag and another right before the closing body tag. I have a feeling it’s just too easy to have conflicts??
I tried putting them the theme .php files, I also found a few wordpress plug-ins that allow custom js and css per page and it’s still not working.
Anyway, thanks for trying to help
June 24, 2012 at 9:19 pm #104833kloyMemberthat’s the thing…everytime I try to do anything to the functions.php file I screw it up.
I’d rather not touch it -
AuthorPosts
- The forum ‘Other’ is closed to new topics and replies.